@@ -43,33 +43,6 @@ mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL * pool, void * ptr)
43
43
/* }}} */
44
44
45
45
46
- /* {{{ mysqlnd_mempool_resize_chunk */
47
- static void *
48
- mysqlnd_mempool_resize_chunk (MYSQLND_MEMORY_POOL * pool , void * ptr , size_t old_size , size_t size )
49
- {
50
- DBG_ENTER ("mysqlnd_mempool_resize_chunk" );
51
-
52
- #ifndef ZEND_TRACK_ARENA_ALLOC
53
- /* Try to back-off and guess if this is the last block allocated */
54
- if (ptr == pool -> last
55
- && (ZEND_MM_ALIGNED_SIZE (size ) <= ((char * )pool -> arena -> end - (char * )ptr ))) {
56
- /*
57
- This was the last allocation. Lucky us, we can free
58
- a bit of memory from the pool. Next time we will return from the same ptr.
59
- */
60
- pool -> arena -> ptr = (char * )ptr + ZEND_MM_ALIGNED_SIZE (size );
61
- DBG_RETURN (ptr );
62
- }
63
- #endif
64
-
65
- void * new_ptr = zend_arena_alloc (& pool -> arena , size );
66
- memcpy (new_ptr , ptr , MIN (old_size , size ));
67
- pool -> last = ptr = new_ptr ;
68
- DBG_RETURN (ptr );
69
- }
70
- /* }}} */
71
-
72
-
73
46
/* {{{ mysqlnd_mempool_get_chunk */
74
47
static void *
75
48
mysqlnd_mempool_get_chunk (MYSQLND_MEMORY_POOL * pool , size_t size )
@@ -100,7 +73,6 @@ mysqlnd_mempool_create(size_t arena_size)
100
73
ret -> checkpoint = NULL ;
101
74
ret -> get_chunk = mysqlnd_mempool_get_chunk ;
102
75
ret -> free_chunk = mysqlnd_mempool_free_chunk ;
103
- ret -> resize_chunk = mysqlnd_mempool_resize_chunk ;
104
76
DBG_RETURN (ret );
105
77
}
106
78
/* }}} */
0 commit comments