Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected behavior of dhara_map_trim #41

Open
Dermiste opened this issue Oct 17, 2024 · 0 comments
Open

Expected behavior of dhara_map_trim #41

Dermiste opened this issue Oct 17, 2024 · 0 comments

Comments

@Dermiste
Copy link

Hi,

First off, great project, I have been using a top layer build on it for a while and everything is working fine.

Couple of days ago I tried using dhara_map_trim and I am a bit confused about the results, scenario described bellow, can you please shed some light on this ? is what I see the expected results or is there something wrong with my code?

Page size is 2048

1 - Initial state:

4 records

Page ID Content
0 0x00, 0x00, 0x00 ...
1 0x01, 0x01, 0x01 ...
2 0x02, 0x02, 0x02 ...
3 0x03, 0x03, 0x03 ...

2 - Action

dhara_map_trim( _ , 2)

Final state:

Expected results

3 records, the ligne with only 2's was removed and garbaged collected

Page ID Content
0 0x00, 0x00, 0x00 ...
1 0x01, 0x01, 0x01 ...
2 0x03, 0x03, 0x03 ...

Actual results:

3 records, but when I try to read the one at index 2 I get 0xff's (= DHARA_E_NOT_FOUND) instead of 0x03's

Page ID Content
0 0x00, 0x00, 0x00 ...
1 0x01, 0x01, 0x01 ...
2 0xff, 0xff, 0xff ...
3 0x03, 0x03, 0x03 ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant