bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Off by one error in pthread.c


From: Ulrich Drepper
Subject: Re: Off by one error in pthread.c
Date: 21 Apr 2001 20:37:39 -0700
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.2 (Thelxepeia)

Ken Leider <address@hidden> writes:

> pthread.c:502
>    /* Setup stack for thread manager */
>    __pthread_manager_thread_bos = malloc(THREAD_MANAGER_STACK_SIZE);
>    if (__pthread_manager_thread_bos == NULL) return -1;
>    __pthread_manager_thread_tos =
>      __pthread_manager_thread_bos + THREAD_MANAGER_STACK_SIZE;
> ------------------------
> THREAD_MANAGER_STACK_SIZE is set to 2*pagesize - 32 in internals.h.  This was
> done to account for allocation overhead.  I wonder if this calculation will
> still be correct on a 64 bit machine.

The worst which can happen is that the allocation is less efficient.
But it won't.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]