1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Added missing API functions

This commit is contained in:
Dmitry Stogov
2015-07-09 12:19:30 +03:00
parent 0de0c4ace1
commit 225bb70498
2 changed files with 16 additions and 0 deletions

View File

@@ -2443,6 +2443,20 @@ ZEND_API zend_mm_heap *zend_mm_set_heap(zend_mm_heap *new_heap)
return (zend_mm_heap*)old_heap;
}
ZEND_API zend_mm_heap *zend_mm_get_heap(void)
{
return AG(mm_heap);
}
ZEND_API int zend_mm_is_custom_heap(zend_mm_heap *new_heap)
{
#if ZEND_MM_CUSTOM
return AG(mm_heap)->use_custom_heap;
#else
return 0;
#endif
}
ZEND_API void zend_mm_set_custom_handlers(zend_mm_heap *heap,
void* (*_malloc)(size_t),
void (*_free)(void*),

View File

@@ -280,7 +280,9 @@ ZEND_API size_t ZEND_FASTCALL _zend_mm_block_size(zend_mm_heap *heap, void *p ZE
#define zend_mm_block_size_rel(heap, p) _zend_mm_block_size((heap), (p) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
ZEND_API zend_mm_heap *zend_mm_set_heap(zend_mm_heap *new_heap);
ZEND_API zend_mm_heap *zend_mm_get_heap(void);
ZEND_API int zend_mm_is_custom_heap(zend_mm_heap *new_heap);
ZEND_API void zend_mm_set_custom_handlers(zend_mm_heap *heap,
void* (*_malloc)(size_t),
void (*_free)(void*),