Age | Commit message (Collapse) | Author | Lines |
2022年10月19日 | remove LFS64 programming interfaces (macro-only) from _GNU_SOURCE | Rich Felker | -1/+1 |
|
these badly pollute the namespace with macros whenever _GNU_SOURCE is
defined, which is always the case with g++, and especially tends to
interfere with C++ constructs.
as our implementation of these was macro-only, their removal cannot
affect any existing binaries. at the source level, portable software
should be prepared for them not to exist.
for now, they are left in place with explicit _LARGEFILE64_SOURCE.
this provides an easy temporary path for integrators/distributions to
get packages building again right away if they break while working on
a proper, upstreamable fix. the intent is that this be a very
short-term measure and that the macros be removed entirely in the next
release cycle.
|
2021年02月15日 | sys/mman.h: add MAP_HUGE_16KB from linux v5.10 | Szabolcs Nagy | -0/+1 |
|
see
linux commit e47168f3d1b14af5281cf50c59561d59d28201f9
powerpc/8xx: Support 16k hugepages with 4k pages
|
2020年09月09日 | sys/mman.h: add MREMAP_DONTUNMAP from linux v5.7 | Szabolcs Nagy | -0/+1 |
|
it remaps anon mappings without unmapping the original. chromeos plans
to use it with userfaultfd, see:
linux commit e346b3813067d4b17383f975f197a9aa28a3b077
mm/mremap: add MREMAP_DONTUNMAP to mremap()
|
2019年12月30日 | sys/mman.h: add MADV_COLD and MADV_PAGEOUT from linux v5.4 | Szabolcs Nagy | -0/+2 |
|
These were mainly introduced so android can optimize the memory usage
of unused apps.
MADV_COLD hints that the memory range is currently not needed (unlike
with MADV_FREE the content is not garbage, it needs to be swapped):
linux commit 9c276cc65a58faf98be8e56962745ec99ab87636
mm: introduce MADV_COLD
MADV_PAGEOUT hints that the memory range is not needed for a long time
so it can be reclaimed immediately independently of memory pressure
(unlike with MADV_DONTNEED the content is not garbage):
linux commit 1a4e58cce84ee88129d5d49c064bd2852b481357
mm: introduce MADV_PAGEOUT
|
2019年03月13日 | sys/mman.h: add new hugetlb mmap flags from linux v4.19 | Szabolcs Nagy | -0/+2 |
|
aarch64 supports 32MB and 512MB hugetlb page sizes too.
added in linux commit 20916d4636a9b3c1bf562b305f91d126771edaf9
|
2018年06月20日 | add memfd_create syscall wrapper | Szabolcs Nagy | -0/+5 |
|
memfd_create was added in linux v3.17 and glibc has api for it.
|
2018年06月20日 | add mlock2 linux syscall wrapper | Szabolcs Nagy | -3/+8 |
|
mlock2 syscall was added in linux v4.4 and glibc has api for it.
It falls back to mlock in case of flags==0, so that case works
even on older kernels.
MLOCK_ONFAULT is moved under _GNU_SOURCE following glibc.
|
2018年06月19日 | add MAP_FIXED_NOREPLACE from linux v4.17 | Szabolcs Nagy | -0/+1 |
|
to map at a fixed address without unmapping underlying mappings
(fails with EEXIST unlike MAP_FIXED), new in linux commits
4ed28639519c7bad5f518e70b3284c6e0763e650 and
a4ff8e8620d3f4f50ac4b41e8067b7d395056843.
|
2018年02月22日 | add MAP_SYNC and MAP_SHARED_VALIDATE from linux v4.15 | Szabolcs Nagy | -0/+2 |
|
for synchronous page faults, new in linux commit
1c9725974074a047f6080eecc62c50a8e840d050 and
b6fb293f2497a9841d94f6b57bd2bb2cd222da43
note that only targets that use asm-generic/mman.h have this new
flag defined, so undef it on other targets (mips*, powerpc*).
|
2018年02月22日 | sys/{mman,shm}.h: add {MAP,SHM}_HUGE_ macros from linux uapi | Szabolcs Nagy | -0/+13 |
|
*_HUGE_SHIFT, *_HUGE_2MB, *_HUGE_1GB are documented in the man page,
so add all of the *_HUGE_* macros from linux uapi.
if MAP_HUGETLB is set, top bits of the mmap flags encode the page size.
see the linux commit aafd4562dfee81a40ba21b5ea3cf5e06664bc7f6
if SHM_HUGETLB is set, top bits of the shmget flags encode the page size.
see the linux commit 4da243ac1cf6aeb30b7c555d56208982d66d6d33
*_HUGE_16GB is defined unsigned to avoid signed left shift ub.
|
2018年02月22日 | sys/mman.h: add MADV_WIPEONFORK from linux v4.14 | Szabolcs Nagy | -0/+2 |
|
allows zeroing anonymous private pages inherited by a child process.
new in linux commit d2cd9ede6e193dd7d88b6d27399e96229a551b19
|
2016年03月19日 | add MADV_FREE madvise command from linux v4.5 | Szabolcs Nagy | -0/+1 |
|
allows the os to free the marked pages lazily on memory pressure.
expected to increase malloc performance.
new in linux commit 854e9ed09dedf0c19ac8640e91bcc74bc3f9e5c9
|
2016年03月18日 | deduplicate bits/mman.h | Szabolcs Nagy | -0/+59 |
|
currently five targets use the same mman.h constants and the rest
share most constants too, so move them to sys/mman.h before the
bits/mman.h include where the differences can be corrected by
redefinition of the macros.
this fixes two minor bugs: POSIX_MADV_DONTNEED was wrong on most
targets (it should be the same as MADV_DONTNEED), and sh defined
the x86-only MAP_32BIT mmap flag.
|
2016年01月26日 | add MCL_ONFAULT and MLOCK_ONFAULT mlockall and mlock2 flags | Szabolcs Nagy | -0/+1 |
|
they lock faulted pages into memory (useful when a small part of a
large mapped file needs efficient access), new in linux v4.4, commit
b0f205c2a3082dd9081f9a94e50658c5fa906ff1
MLOCK_* is not in the POSIX reserved namespace for sys/mman.h
|
2015年01月30日 | move MREMAP_MAYMOVE and MREMAP_FIXED out of bits | Trutz Behn | -0/+2 |
|
the definitions are generic for all kernel archs. exposure of these
macros now only occurs on the same feature test as for the function
accepting them, which is believed to be more correct.
|
2014年01月07日 | fix signedness of pgoff argument to remap_file_pages | Rich Felker | -1/+1 |
|
both the kernel and glibc agree that this argument is unsigned; the
incorrect type ssize_t came from erroneous man pages.
|
2012年09月16日 | add clock_adjtime, remap_file_pages, and syncfs syscall wrappers | Rich Felker | -0/+5 |
|
patch by Justin Cormack, with slight modification
|
2012年09月09日 | mincore syscall wrapper | Rich Felker | -0/+1 |
|
2012年09月07日 | default features: make musl usable without feature test macros | Rich Felker | -0/+2 |
|
the old behavior of exposing nothing except plain ISO C can be
obtained by defining __STRICT_ANSI__ or using a compiler option (such
as -std=c99) that predefines it. the new default featureset is POSIX
with XSI plus _BSD_SOURCE. any explicit feature test macros will
inhibit the default.
installation docs have also been updated to reflect this change.
|
2012年06月04日 | _GNU_SOURCE is supposed to imply _LARGEFILE64_SOURCE | Rich Felker | -1/+1 |
|
this is ugly and stupid, but now that the *64 symbol names exist, a
lot of broken GNU software detects them in configure, then either
breaks during build due to missing off64_t definition, or attempts to
compile without function declarations/prototypes. "fixing" it here is
easier than telling everyone to add yet another feature test macro to
their builds.
|
2012年05月22日 | support _BSD_SOURCE feature test macro | Rich Felker | -0/+3 |
|
patch by Isaac Dunham. matched closely (maybe not exact) to glibc's
idea of what _BSD_SOURCE should make visible.
|
2012年05月04日 | add *64 junk for sys/*.h headers | Rich Felker | -0/+5 |
|
2011年03月03日 | namespace cleanup in sys/mman.h | Rich Felker | -1/+3 |
|
2011年02月12日 | initial check-in, version 0.5.0 v0.5.0 | Rich Felker | -0/+37 |
|