mmap anonymous answers SO question

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-10-06 00:00:01 +00:00
parent 05f9a1f4be
commit 3c3deb14dc

View File

@@ -13105,6 +13105,8 @@ In POSIX 7 mmap always maps to a file.
If we add the MAP_ANONYMOUS Linux extension however, this is not required, and mmap can be used to allocate memory like malloc.
Answers: https://stackoverflow.com/questions/4779188/how-to-use-mmap-to-allocate-a-memory-in-heap
===== mmap file
Memory mapped file example: link:userland/posix/mmap_file.c[]