summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_alloc.h')
-rw-r--r--Zend/zend_alloc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index 519a59d254..ae7e75345e 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -284,6 +284,10 @@ ZEND_API zend_mm_heap *zend_mm_get_heap(void);
ZEND_API size_t zend_mm_gc(zend_mm_heap *heap);
+#define ZEND_MM_CUSTOM_HEAP_NONE 0
+#define ZEND_MM_CUSTOM_HEAP_STD 1
+#define ZEND_MM_CUSTOM_HEAP_DEBUG 2
+
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),
@@ -294,6 +298,13 @@ ZEND_API void zend_mm_get_custom_handlers(zend_mm_heap *heap,
void (**_free)(void*),
void* (**_realloc)(void*, size_t));
+#if ZEND_DEBUG
+ZEND_API void zend_mm_set_custom_debug_handlers(zend_mm_heap *heap,
+ void* (*_malloc)(size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC),
+ void (*_free)(void* ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC),
+ void* (*_realloc)(void*, size_t ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC));
+#endif
+
typedef struct _zend_mm_storage zend_mm_storage;
typedef void* (*zend_mm_chunk_alloc_t)(zend_mm_storage *storage, size_t size, size_t alignment);