Lines Matching refs:guardsize

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()
157 return (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1); in guard_position()
164 setup_stack_prot (char *mem, size_t size, char *guard, size_t guardsize, in setup_stack_prot() argument
167 char *guardend = guard + guardsize; in setup_stack_prot()
171 if (__mprotect (guardend, size - guardsize, prot) != 0) in setup_stack_prot()
187 advise_stack_range (void *mem, size_t size, uintptr_t pd, size_t guardsize) in advise_stack_range() argument
200 uintptr_t free_end = (pd - guardsize) & ~pagesize_m1; in advise_stack_range()
328 size_t guardsize; in allocate_stack() local
347 guardsize = (attr->guardsize + pagesize_m1) & ~pagesize_m1; in allocate_stack()
348 reported_guardsize = guardsize; in allocate_stack()
349 if (guardsize > 0 && guardsize < ARCH_MIN_GUARD_SIZE) in allocate_stack()
350 guardsize = ARCH_MIN_GUARD_SIZE; 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()
370 mem = __mmap (NULL, size, (guardsize == 0) ? prot : PROT_NONE, in allocate_stack()
393 if (__glibc_likely (guardsize > 0)) 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()
409 pd->guardsize = guardsize; in allocate_stack()
478 if (__glibc_unlikely (guardsize > pd->guardsize)) in allocate_stack()
480 char *guard = guard_position (mem, size, guardsize, pd, in allocate_stack()
482 if (__mprotect (guard, guardsize, PROT_NONE) != 0) in allocate_stack()
505 pd->guardsize = guardsize; 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()
520 if (__mprotect (guard + guardsize, in allocate_stack()
521 oldguard + pd->guardsize - guard - guardsize, in allocate_stack()
525 if (__mprotect ((char *) mem + guardsize, pd->guardsize - guardsize, in allocate_stack()
529 char *new_guard = (char *)(((uintptr_t) pd - guardsize) in allocate_stack()
531 char *old_guard = (char *)(((uintptr_t) pd - pd->guardsize) in allocate_stack()
540 pd->guardsize = guardsize; in allocate_stack()