Lines Matching refs:ptr
27 mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL * pool, void * ptr) in mysqlnd_mempool_free_chunk() argument
32 if (ptr == pool->last) { in mysqlnd_mempool_free_chunk()
37 pool->arena->ptr = (char*)ptr; in mysqlnd_mempool_free_chunk()
48 mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL * pool, void * ptr, size_t old_size, size_t size) in mysqlnd_mempool_resize_chunk() argument
54 if (ptr == pool->last in mysqlnd_mempool_resize_chunk()
55 && (ZEND_MM_ALIGNED_SIZE(size) <= ((char*)pool->arena->end - (char*)ptr))) { in mysqlnd_mempool_resize_chunk()
60 pool->arena->ptr = (char*)ptr + ZEND_MM_ALIGNED_SIZE(size); in mysqlnd_mempool_resize_chunk()
61 DBG_RETURN(ptr); in mysqlnd_mempool_resize_chunk()
66 memcpy(new_ptr, ptr, MIN(old_size, size)); in mysqlnd_mempool_resize_chunk()
67 pool->last = ptr = new_ptr; in mysqlnd_mempool_resize_chunk()
68 DBG_RETURN(ptr); in mysqlnd_mempool_resize_chunk()
77 void *ptr = NULL; in mysqlnd_mempool_get_chunk() local
80 ptr = zend_arena_alloc(&pool->arena, size); in mysqlnd_mempool_get_chunk()
81 pool->last = ptr; in mysqlnd_mempool_get_chunk()
83 DBG_RETURN(ptr); in mysqlnd_mempool_get_chunk()