MAP_GROWSDOWN missing in linuxthreads/manager.c?
Khem Raj
raj.khem at gmail.com
Thu Feb 18 20:44:46 UTC 2010
On Thu, Feb 18, 2010 at 12:05 PM, Ine Ya <ineyaa at gmail.com> wrote:
> The code, which is creating stack (pthread_allocate_stack) in
> linuxthreads.old/manager.c looks like:
>
> if (mmap((caddr_t)((char *)(new_thread + 1) - INITIAL_STACK_SIZE),
> INITIAL_STACK_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC,
> MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_GROWSDOWN,
>
> however in linuxthreads/manager.c MAP_GROWSDOWN is missing in case of
> _STACK_GROWS_DOWN
> map_addr = mmap(new_thread, stacksize + guardsize,
> PROT_READ | PROT_WRITE | PROT_EXEC,
> MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1
>
> Is this deliberate?
yes. Also see calculation of new_thread_bottom is changed too.
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc
>
More information about the uClibc
mailing list