mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
mmap anonymous answers SO question
This commit is contained in:
@@ -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[]
|
||||
|
||||
Reference in New Issue
Block a user