Lines Matching refs:guardsize

148 guard_position (void *mem, size_t size, size_t guardsize, struct pthread *pd,  in guard_position()  argument
152 return mem + (((size - guardsize) / 2) & ~pagesize_m1); in guard_position()
156 return (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1); in guard_position()
163 setup_stack_prot (char *mem, size_t size, char *guard, size_t guardsize, in setup_stack_prot() argument
166 char *guardend = guard + guardsize; in setup_stack_prot()
170 if (__mprotect (guardend, size - guardsize, prot) != 0) in setup_stack_prot()
186 advise_stack_range (void *mem, size_t size, uintptr_t pd, size_t guardsize) in advise_stack_range() argument
199 uintptr_t free_end = (pd - guardsize) & ~pagesize_m1; in advise_stack_range()
324 size_t guardsize; in allocate_stack() local
343 guardsize = (attr->guardsize + pagesize_m1) & ~pagesize_m1; in allocate_stack()
344 reported_guardsize = guardsize; in allocate_stack()
345 if (guardsize > 0 && guardsize < ARCH_MIN_GUARD_SIZE) in allocate_stack()
346 guardsize = ARCH_MIN_GUARD_SIZE; in allocate_stack()
347 if (guardsize < attr->guardsize || size + guardsize < guardsize) in allocate_stack()
350 size += guardsize; in allocate_stack()
351 if (__builtin_expect (size < ((guardsize + tls_static_size_for_stack in allocate_stack()
366 mem = __mmap (NULL, size, (guardsize == 0) ? prot : PROT_NONE, in allocate_stack()
389 if (__glibc_likely (guardsize > 0)) in allocate_stack()
391 char *guard = guard_position (mem, size, guardsize, pd, in allocate_stack()
393 if (setup_stack_prot (mem, size, guard, guardsize, prot) != 0) in allocate_stack()
405 pd->guardsize = guardsize; in allocate_stack()
471 if (__glibc_unlikely (guardsize > pd->guardsize)) in allocate_stack()
473 char *guard = guard_position (mem, size, guardsize, pd, in allocate_stack()
475 if (__mprotect (guard, guardsize, PROT_NONE) != 0) in allocate_stack()
498 pd->guardsize = guardsize; in allocate_stack()
500 else if (__builtin_expect (pd->guardsize - guardsize > size - reqsize, in allocate_stack()
506 char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1); in allocate_stack()
507 char *oldguard = mem + (((size - pd->guardsize) / 2) & ~pagesize_m1); in allocate_stack()
513 if (__mprotect (guard + guardsize, in allocate_stack()
514 oldguard + pd->guardsize - guard - guardsize, in allocate_stack()
518 if (__mprotect ((char *) mem + guardsize, pd->guardsize - guardsize, in allocate_stack()
522 char *new_guard = (char *)(((uintptr_t) pd - guardsize) in allocate_stack()
524 char *old_guard = (char *)(((uintptr_t) pd - pd->guardsize) in allocate_stack()
533 pd->guardsize = guardsize; in allocate_stack()