Lines Matching refs:page_size
162 static size_t page_size = 0; in zend_fiber_get_page_size() local
164 if (!page_size) { in zend_fiber_get_page_size()
165 page_size = zend_get_page_size(); in zend_fiber_get_page_size()
166 if (!page_size || (page_size & (page_size - 1))) { in zend_fiber_get_page_size()
168 page_size = ZEND_FIBER_DEFAULT_PAGE_SIZE; in zend_fiber_get_page_size()
172 return page_size; in zend_fiber_get_page_size()
178 const size_t page_size = zend_fiber_get_page_size(); in zend_fiber_stack_allocate() local
179 const size_t minimum_stack_size = page_size + ZEND_FIBER_GUARD_PAGES * page_size; in zend_fiber_stack_allocate()
186 const size_t stack_size = (size + page_size - 1) / page_size * page_size; in zend_fiber_stack_allocate()
187 const size_t alloc_size = stack_size + ZEND_FIBER_GUARD_PAGES * page_size; in zend_fiber_stack_allocate()
203 …if (!VirtualProtect(pointer, ZEND_FIBER_GUARD_PAGES * page_size, PAGE_READWRITE | PAGE_GUARD, &pro… in zend_fiber_stack_allocate()
221 if (mprotect(pointer, ZEND_FIBER_GUARD_PAGES * page_size, PROT_NONE) < 0) { in zend_fiber_stack_allocate()
231 stack->pointer = (void *) ((uintptr_t) pointer + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_allocate()
253 const size_t page_size = zend_fiber_get_page_size(); in zend_fiber_stack_free() local
255 void *pointer = (void *) ((uintptr_t) stack->pointer - ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free()
260 munmap(pointer, stack->size + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free()