Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
singular
· 13y ago · 0 comments
Would a malloc (alone) work? Doesn't it typically act as if the memory were allocated but not actually use physical RAM until the data is filled?
Comments
[–]
0x0
13y ago
I'm pretty sure that even if you malloc an enormous amount of memory, it will occupy close to no resources as long as the contents are not touched. Also related: "overcommit memory".
[–]
e12e
13y ago
Linux is a bit strange when it comes to memory allocation, see eg:
http://www.win.tue.nl/~aeb/linux/lk/lk-9.html#ss9.6