You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FreeMiNT returns freephysmem() / PAGESIZE in sys_s_ysconf()
freephysmem() returns the free physical memory because tot_rsize() is called with flag = 0
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)?
The text was updated successfully, but these errors were encountered:
sysconf(_SC_PHYS_PAGES)
returnsSysconf(7)
_SC_PHYS_PAGES
is defined in confname.h (mintlib)freephysmem() / PAGESIZE
in sys_s_ysconf()freephysmem()
returns the free physical memory becausetot_rsize()
is called withflag
= 0Therefore,
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)?
The text was updated successfully, but these errors were encountered: