3 ms·
Seems that VirtualAlloc() [1] is a little bit closer to madvise(), but still is pretty far. madvise() is quite powerful. For instance, take a look at MADV_FREE.
by senozhatsky 8y ago
Seems that VirtualAlloc() [1] is a little bit closer to madvise(), but still is pretty far. madvise() is quite
powerful. For instance, take a look at MADV_FREE.
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa366887(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
-ss
- PeCaN 8y agoI figured the use-case here was MADV_WILLNEED, which is what PrefetchVirtualMemory is for. VirtualAlloc flags would be for things like reserving virtual pages without committing them. There's no single API on Windows that does the myriad of things that madvise does.