Skip to content

Commit 82f3923

Browse files
remove redundant zend_mm_heap_create() function
1 parent de2cd13 commit 82f3923

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

Zend/zend_alloc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,11 +3137,6 @@ ZEND_API zend_mm_heap *zend_mm_get_heap(void)
31373137
return AG(mm_heap);
31383138
}
31393139

3140-
ZEND_API zend_mm_heap *zend_mm_heap_create(void)
3141-
{
3142-
return zend_mm_init();
3143-
}
3144-
31453140
ZEND_API void zend_mm_heap_free(zend_mm_heap *heap)
31463141
{
31473142
zend_mm_chunk_free(heap, heap->main_chunk, ZEND_MM_CHUNK_SIZE);

Zend/zend_alloc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ ZEND_API size_t ZEND_FASTCALL _zend_mm_block_size(zend_mm_heap *heap, void *p ZE
263263
#define zend_mm_realloc2_rel(heap, p, size, copy_size) _zend_mm_realloc2((heap), (p), (size), (copy_size) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
264264
#define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
265265

266-
ZEND_API zend_mm_heap *zend_mm_heap_create(void);
267266
ZEND_API void zend_mm_heap_free(zend_mm_heap* heap);
268267
ZEND_API zend_mm_heap *zend_mm_set_heap(zend_mm_heap *new_heap);
269268
ZEND_API zend_mm_heap *zend_mm_get_heap(void);

ext/zend_test/zend_mm_custom_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void zend_test_mm_custom_handlers_init(void)
106106
);
107107
}
108108
printf("Prev handlers at %p, %p, %p, %p, %p\n", ZT_G(custom_malloc), ZT_G(custom_free), ZT_G(custom_realloc), ZT_G(custom_gc), ZT_G(custom_shutdown));
109-
ZT_G(observed_heap) = zend_mm_heap_create();
109+
ZT_G(observed_heap) = zend_mm_startup();
110110
zend_mm_set_custom_handlers(
111111
ZT_G(observed_heap),
112112
observe_malloc,

0 commit comments

Comments
 (0)