diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-31 15:19:39 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-31 15:19:39 -0400 |
commit | 5db951ef80cae8b627f95b995811bf916c069757 (patch) | |
tree | a5835c1d42d0be770f6cf8b96b6221fc733d499a /src/locale/setlocale.c | |
parent | 27593d3a357073cfd24e6b09e207b8c742cd2dd7 (diff) | |
download | musl-5db951ef80cae8b627f95b995811bf916c069757.tar.gz musl-5db951ef80cae8b627f95b995811bf916c069757.tar.bz2 musl-5db951ef80cae8b627f95b995811bf916c069757.tar.xz musl-5db951ef80cae8b627f95b995811bf916c069757.zip |
in pthread_getattr_np, use mremap rather than madvise to measure stack
the original motivation for this patch was that qemu (and possibly
other syscall emulators) nop out madvise, resulting in an infinite
loop. however, there is another benefit to this change: madvise may
actually undo an explicit madvise the application intended for its
stack, whereas the mremap operation is a true nop. the logic here is
that mremap must fail if it cannot resize the mapping in-place, and
the caller knows that it cannot resize in-place because it knows the
next page of virtual memory is already occupied.
Diffstat (limited to 'src/locale/setlocale.c')
0 files changed, 0 insertions, 0 deletions