Backup memory on OS X

What is equivalent to Windows VirtualAllocin OS X? That is, how can I reserve an adjacent address space without committing it, and then copying its pieces?

Thank,

Alex

+3
source share
2 answers

A function mmap()called with MAP_ANON | MAP_PRIVATEis very roughly equivalent VirtualAlloc()to a flag MEM_RESERVE. Then the memory is fixed by touching each page to the display.

+6
source

No, unfortunately, there is no exact equivalent VirtualAlloc.

0
source

Source: https://habr.com/ru/post/1761402/


All Articles