Lines Matching refs:size
34 static zend_always_inline zend_arena* zend_arena_create(size_t size) in zend_arena_create() argument
36 zend_arena *arena = (zend_arena*)emalloc(size); in zend_arena_create()
39 arena->end = (char*) arena + size; in zend_arena_create()
53 static zend_always_inline void* zend_arena_alloc(zend_arena **arena_ptr, size_t size) in zend_arena_alloc() argument
58 size = ZEND_MM_ALIGNED_SIZE(size); in zend_arena_alloc()
60 if (EXPECTED(size <= (size_t)(arena->end - ptr))) { in zend_arena_alloc()
61 arena->ptr = ptr + size; in zend_arena_alloc()
64 …UNEXPECTED((size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) > (size_t)(arena->end - (char*) arena… in zend_arena_alloc()
65 (size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) : in zend_arena_alloc()
70 new_arena->ptr = (char*) new_arena + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena)) + size; in zend_arena_alloc()
82 size_t size; in zend_arena_calloc() local
85 size = zend_safe_address(unit_size, count, 0, &overflow); in zend_arena_calloc()
89 ret = zend_arena_alloc(arena_ptr, size); in zend_arena_calloc()
90 memset(ret, 0, size); in zend_arena_calloc()
163 static zend_always_inline void *zend_arena_alloc(zend_arena **arena_ptr, size_t size) in zend_arena_alloc() argument
172 return *arena->ptr++ = emalloc(size); in zend_arena_alloc()
178 size_t size; in zend_arena_calloc() local
181 size = zend_safe_address(unit_size, count, 0, &overflow); in zend_arena_calloc()
185 ret = zend_arena_alloc(arena_ptr, size); in zend_arena_calloc()
186 memset(ret, 0, size); in zend_arena_calloc()