MAP_FIXED gone
Ulrich Drepper
drepper@redhat.com
Sun Dec 31 23:02:00 GMT 2000
You might have seen that the MAP_FIXED in the mmap calls to allocate
thread stacks are gone. I forgot about the munmap patch Wolfram sent
and which I applied earlier. Undoing it fixed the problems I had
yesterday.
Now the memory handling should be fine. The heap can safely collide
with the stack area and nothing bad happens (except that no new
threads can be created).
The only potential problem is that possibly not all kernel revisions
support this kind of use of mmap. To repeat, the new allocation
provides an address != NULL to mmap and does not at the same time uses
MAP_FIXED. The kernel supports this and will return a memory region
at the given address whenever this is possible. This seems to be
implemented this way for quite some time but it deserves testing. If
you have access to machines with old kernels please give it a try.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-hacker
mailing list