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

'reserved' and 'committed' stats don't appear to match their descriptions #47

Closed
jritts opened this issue Jun 25, 2019 · 2 comments
Closed

Comments

@jritts
Copy link

jritts commented Jun 25, 2019

Thank you for making this library available! I'm enjoying playing around with it.

In Windows, the flags MEM_COMMIT and MEM_RESERVE are passed together to VirtualAlloc, yet the 'committed' heap stat does not equal 'reserved'. It seems like the library's intention is for those stats to have the equivalent API semantics of 'backed by physical' vs 'reserved virtual address space'.

The same bug appears to apply to the other platforms, though I'm not as familiar with mmap and could be wrong.

@daanx
Copy link
Collaborator

daanx commented Jun 26, 2019

Ah, the stats indeed have nothing to do with Windows reserved and committed. The committed statistic is about memory that is touched by the allocator (and thus the underlying OS pages) while reserved says how much memory is allocated from the OS (but perhaps just virtually until it is touched like on Windows or Linux). Does that make sense?

@jritts
Copy link
Author

jritts commented Jun 26, 2019

Ah, it was my misunderstanding - thank you for taking the time to respond. Closing the issue...

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

2 participants