mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-29 05:50:27 +00:00
Introduce MAP_HUGETLB
This commit is contained in:
parent
9b87dd2b87
commit
f029375d39
6 changed files with 7 additions and 3 deletions
|
@ -230,6 +230,7 @@ syscon mmap MAP_NORESERVE 0x00004000 0x00004000 0x00000040 0x00000040 0
|
|||
syscon mmap MAP_POPULATE 0x00008000 0x00008000 0 0 0x00040000 0 0 0 # MAP_PREFAULT_READ on FreeBSD; can avoid madvise(MADV_WILLNEED) on private file mapping
|
||||
syscon mmap MAP_NONBLOCK 0x00010000 0x00010000 0 0 0 0 0 0
|
||||
syscon mmap MAP_SYNC 0x00080000 0x00080000 0 0 0 0 0 0 # perform synchronous page faults for mapping (Linux 4.15+)
|
||||
syscon mmap MAP_HUGETLB 0x00040000 -1 -1 -1 -1 -1 -1 -1 # make it inherit across execve()
|
||||
syscon mmap MAP_INHERIT -1 -1 -1 -1 -1 -1 0x00000080 -1 # make it inherit across execve()
|
||||
syscon mmap MAP_HASSEMAPHORE 0 0 0x00000200 0x00000200 0x00000200 0 0x00000200 0 # does it matter on x86?
|
||||
syscon mmap MAP_NOSYNC 0 0 0 0 0x00000800 0 0 0 # flush to physical media only when necessary rather than gratuitously; be sure to use write() rather than ftruncate() with this!
|
||||
|
|
2
libc/sysv/consts/MAP_HUGETLB.S
Normal file
2
libc/sysv/consts/MAP_HUGETLB.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon mmap,MAP_HUGETLB,0x00040000,-1,-1,-1,-1,-1,-1,-1
|
|
@ -13,6 +13,7 @@ extern const int MAP_FILE;
|
|||
extern const int MAP_FIXED;
|
||||
extern const int MAP_FIXED_NOREPLACE;
|
||||
extern const int MAP_HASSEMAPHORE;
|
||||
extern const int MAP_HUGETLB;
|
||||
extern const int MAP_INHERIT;
|
||||
extern const int MAP_JIT;
|
||||
extern const int MAP_LOCKED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue