Lines Matching refs:page_size
193 static size_t page_size = 0; in zend_fiber_get_page_size() local
195 if (!page_size) { in zend_fiber_get_page_size()
196 page_size = zend_get_page_size(); in zend_fiber_get_page_size()
197 if (!page_size || (page_size & (page_size - 1))) { in zend_fiber_get_page_size()
199 page_size = ZEND_FIBER_DEFAULT_PAGE_SIZE; in zend_fiber_get_page_size()
203 return page_size; in zend_fiber_get_page_size()
209 const size_t page_size = zend_fiber_get_page_size(); in zend_fiber_stack_allocate() local
210 const size_t minimum_stack_size = page_size + ZEND_FIBER_GUARD_PAGES * page_size; in zend_fiber_stack_allocate()
217 const size_t stack_size = (size + page_size - 1) / page_size * page_size; in zend_fiber_stack_allocate()
218 const size_t alloc_size = stack_size + ZEND_FIBER_GUARD_PAGES * page_size; in zend_fiber_stack_allocate()
234 …if (!VirtualProtect(pointer, ZEND_FIBER_GUARD_PAGES * page_size, PAGE_READWRITE | PAGE_GUARD, &pro… in zend_fiber_stack_allocate()
260 if (mprotect(pointer, ZEND_FIBER_GUARD_PAGES * page_size, PROT_NONE) < 0) { in zend_fiber_stack_allocate()
270 stack->pointer = (void *) ((uintptr_t) pointer + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_allocate()
309 const size_t page_size = zend_fiber_get_page_size(); in zend_fiber_stack_free() local
311 void *pointer = (void *) ((uintptr_t) stack->pointer - ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free()
316 ASAN_UNPOISON_MEMORY_REGION(pointer, stack->size + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free()
322 munmap(pointer, stack->size + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free()