diff options
| author | Jason Evans <jasone@FreeBSD.org> | 1999-12-29 15:44:59 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 1999-12-29 15:44:59 +0000 |
| commit | 91e92a2d3d40eaa9db59cd673229d3cbe90ef3dd (patch) | |
| tree | c42f286eb3600c15428901ca0600797fb4bd8a43 /lib/libpthread/thread/thr_init.c | |
| parent | a886640d01ff1deee759567098ceed23b566c14c (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_init.c')
| -rw-r--r-- | lib/libpthread/thread/thr_init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c index c888697d0c8f..051483f17af0 100644 --- a/lib/libpthread/thread/thr_init.c +++ b/lib/libpthread/thread/thr_init.c @@ -186,7 +186,13 @@ _thread_init(void) /* Initialize the thread stack cache: */ SLIST_INIT(&_stackq); - /* Create the red zone for the main stack. */ + /* + * Create a red zone below the main stack. All other stacks are + * constrained to a maximum size by the paramters passed to + * mmap(), but this stack is only limited by resource limits, so + * this stack needs an explicitly mapped red zone to protect the + * thread stack that is just beyond. + */ if (mmap((void *) USRSTACK - PTHREAD_STACK_INITIAL - PTHREAD_STACK_GUARD, PTHREAD_STACK_GUARD, 0, MAP_ANON, -1, 0) == MAP_FAILED) |
