Skip to content

Heap size in memory plot #273

Answered by pablogsal
Kacper-Pietkun asked this question in Q&A
Discussion options

You must be logged in to vote

This is very possible. You can request more memory than what you have and the kernel will have different ways to act here. For instance, it can simply do nothing until you write to this memory, in which case it will do the actual allocation. Another thing it can do is use SWAP space to satisfy the memory that you are requesting. Something else than can happen if that the program is calling mmap with file-backed storage.

You can read more about this here.

Without more data is difficult to know exactly what's happening but my guess here is that your program either has file-backed mmap-ed chunks or is requesting a ton of memory that is not used.

If you give us a very small reproducer that we…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pablogsal
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants