mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
mmap anonymous
This commit is contained in:
@@ -1,13 +1,4 @@
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#mmap
|
||||
*
|
||||
* Example of mmap on files.
|
||||
*
|
||||
* Create a file, mmap to it, write to maped memory, close.
|
||||
*
|
||||
* Then read the file and confirm it was written to.
|
||||
*
|
||||
* Implemented in Linux by the mmap syscall.
|
||||
*/
|
||||
/* https://cirosantilli.com/linux-kernel-module-cheat#mmap-file */
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
#include <assert.h>
|
||||
|
||||
Reference in New Issue
Block a user