mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 04:54:27 +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.
|
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
|
===== mmap file
|
||||||
|
|
||||||
Memory mapped file example: link:userland/posix/mmap_file.c[]
|
Memory mapped file example: link:userland/posix/mmap_file.c[]
|
||||||
|
|||||||
Reference in New Issue
Block a user