Any way to reserve but not commit memory in linux?
Posted
by Eloff
on Stack Overflow
See other posts from Stack Overflow
or by Eloff
Published on 2010-05-06T16:14:30Z
Indexed on
2010/05/06
16:18 UTC
Read the original article
Hit count: 173
linux
Windows has VirtualAlloc, which allows you to reserve a contiguous region of address space, but not actually use any physical memory. Later when you want to use it (or part of it) you call VirtualAlloc again to commit the region of previously reserved pages.
This is actually really useful, but I want to eventually port my application to linux - so I don't want to use it if I can't port it later. Does linux have a way to do this?
© Stack Overflow or respective owner