Lines Matching refs:size
59 size_t size = *sizep; in get_cached_stack() local
76 if (__nptl_stack_in_use (curr) && curr->stackblock_size >= size) in get_cached_stack()
78 if (curr->stackblock_size == size) in get_cached_stack()
93 || __builtin_expect (result->stackblock_size > 4 * size, 0)) in get_cached_stack()
149 guard_position (void *mem, size_t size, size_t guardsize, struct pthread *pd, in guard_position() argument
153 return mem + (((size - guardsize) / 2) & ~pagesize_m1); in guard_position()
164 setup_stack_prot (char *mem, size_t size, char *guard, size_t guardsize, in setup_stack_prot() argument
171 if (__mprotect (guardend, size - guardsize, prot) != 0) in setup_stack_prot()
177 size_t mprots2 = ((uintptr_t) mem + size) - (uintptr_t) guardend; in setup_stack_prot()
187 advise_stack_range (void *mem, size_t size, uintptr_t pd, size_t guardsize) in advise_stack_range() argument
193 assert (freesize < size); in advise_stack_range()
204 assert (freesize < size); in advise_stack_range()
219 size_t size; in allocate_stack() local
230 size = attr->stacksize; in allocate_stack()
234 size = __default_pthread_attr.internal.stacksize; in allocate_stack()
261 assert (size > adj + TLS_TCB_SIZE); in allocate_stack()
265 assert (size > adj); in allocate_stack()
288 pd->stackblock = (char *) stackaddr - size; in allocate_stack()
289 pd->stackblock_size = size; in allocate_stack()
336 size &= ~tls_static_align_m1; in allocate_stack()
337 assert (size != 0); in allocate_stack()
351 if (guardsize < attr->guardsize || size + guardsize < guardsize) in allocate_stack()
354 size += guardsize; in allocate_stack()
355 if (__builtin_expect (size < ((guardsize + tls_static_size_for_stack in allocate_stack()
363 reqsize = size; in allocate_stack()
364 pd = get_cached_stack (&size, &mem); in allocate_stack()
370 mem = __mmap (NULL, size, (guardsize == 0) ? prot : PROT_NONE, in allocate_stack()
382 pd = (struct pthread *) ((((uintptr_t) mem + size) in allocate_stack()
386 pd = (struct pthread *) ((((uintptr_t) mem + size in allocate_stack()
395 char *guard = guard_position (mem, size, guardsize, pd, in allocate_stack()
397 if (setup_stack_prot (mem, size, guard, guardsize, prot) != 0) in allocate_stack()
399 __munmap (mem, size); in allocate_stack()
406 pd->stackblock_size = size; in allocate_stack()
436 (void) __munmap (mem, size); in allocate_stack()
462 (void) __munmap (mem, size); in allocate_stack()
480 char *guard = guard_position (mem, size, guardsize, pd, in allocate_stack()
500 (void) __munmap (mem, size); in allocate_stack()
507 else if (__builtin_expect (pd->guardsize - guardsize > size - reqsize, in allocate_stack()
513 char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1); in allocate_stack()
514 char *oldguard = mem + (((size - pd->guardsize) / 2) & ~pagesize_m1); in allocate_stack()