Lines Matching refs:pointer
60 void *pointer; in zend_fiber_stack_allocate() local
69 pointer = VirtualAlloc(0, msize, MEM_COMMIT, PAGE_READWRITE); in zend_fiber_stack_allocate()
71 if (!pointer) { in zend_fiber_stack_allocate()
78 …if (!VirtualProtect(pointer, ZEND_FIBER_GUARD_PAGES * page_size, PAGE_READWRITE | PAGE_GUARD, &pro… in zend_fiber_stack_allocate()
79 VirtualFree(pointer, 0, MEM_RELEASE); in zend_fiber_stack_allocate()
84 pointer = mmap(NULL, msize, PROT_READ | PROT_WRITE, ZEND_FIBER_STACK_FLAGS, -1, 0); in zend_fiber_stack_allocate()
86 if (pointer == MAP_FAILED) { in zend_fiber_stack_allocate()
91 if (mprotect(pointer, ZEND_FIBER_GUARD_PAGES * page_size, PROT_NONE) < 0) { in zend_fiber_stack_allocate()
92 munmap(pointer, msize); in zend_fiber_stack_allocate()
98 stack->pointer = (void *) ((uintptr_t) pointer + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_allocate()
101 uintptr_t base = (uintptr_t) stack->pointer; in zend_fiber_stack_allocate()
110 if (!stack->pointer) { in zend_fiber_stack_free()
120 void *pointer = (void *) ((uintptr_t) stack->pointer - ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free() local
123 VirtualFree(pointer, 0, MEM_RELEASE); in zend_fiber_stack_free()
125 munmap(pointer, stack->size + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free()
128 stack->pointer = NULL; in zend_fiber_stack_free()