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

Confusion between _SC_PHYS_PAGES and _SC_AVPHYS_PAGES #310

Open
xdelatour opened this issue May 28, 2023 · 0 comments
Open

Confusion between _SC_PHYS_PAGES and _SC_AVPHYS_PAGES #310

xdelatour opened this issue May 28, 2023 · 0 comments

Comments

@xdelatour
Copy link
Contributor

xdelatour commented May 28, 2023

sysconf(_SC_PHYS_PAGES) returns Sysconf(7)

Therefore, Sysconf(7) returns the number of currently available pages instead of the number of pages of physical memory.

It's really confusing because we can't change _SC_PHYS_PAGES which is already defined, the only solution is to fix the return value (with something like (tot_rsize(core,1)+tot_rsize(alt,1))/PAGESIZE) and tos.hyp will be wrong while it is currently correct.

[EDIT] I may be confused myself, are free pages unallocated pages (vs. allocated pages) or available/existing pages (vs. non-existing pages)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants