Macros | Functions
mman.h File Reference

The file that provides the memory map functions. More...

Macros

#define PROT_NONE   0x00
 Data can not be accessed.
 
#define PROT_READ   0x01
 Data can be read.
 
#define PROT_WRITE   0x02
 Data can be written.
 
#define PROT_EXEC   0x04
 Data can be executed.
 
#define MAP_SHARED   0x0001
 Changes are shared.
 
#define MAP_PRIVATE   0x0002
 Changes are private.
 
#define MAP_FIXED   0x0010
 Interpret the address (addr) exactly.
 
#define MAP_FAILED   ((void *)-1)
 Error return from mmap().
 
#define MADV_NORMAL   0 /* No further special treatment. */
 
#define MADV_RANDOM   1 /* Expect random page references. */
 
#define MADV_SEQUENTIAL   2 /* Expect sequential page references. */
 
#define MADV_WILLNEED   3 /* Will need these pages. */
 
#define MADV_DONTNEED   4 /* Don't need these pages. */
 
#define MADV_REMOVE   9 /* Remove these pages and resources. */
 
#define MADV_DONTFORK   10 /* Do not inherit across fork. */
 
#define MADV_DOFORK   11 /* Do inherit across fork. */
 
#define MADV_MERGEABLE   12 /* KSM may merge identical pages. */
 
#define MADV_UNMERGEABLE   13 /* KSM may not merge identical pages. */
 
#define MADV_HUGEPAGE   14 /* Worth backing with hugepages. */
 
#define MADV_NOHUGEPAGE   15 /* Not worth backing with hugepages. */
 
#define MADV_HWPOISON   100 /* Poison a page for testing. */
 

Functions

void * mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
 Creates or opens a named or unnamed file mapping object for a specified file and maps a view of a file mapping into the address space of a calling process. More...
 
int munmap (void *addr, size_t len)
 Unmaps a mapped view of a file from the calling process's address space. More...
 
int madvise (void *addr, size_t length, int advice)
 give advice about use of memory More...
 

Detailed Description

The file that provides the memory map functions.