summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-08-11 16:33:47 +0300
committerDmitry Stogov <dmitry@zend.com>2015-08-11 16:33:47 +0300
commit162bf9e802b3d5aec43b6cdcb6ea87169923076a (patch)
tree4a0a35e35a3047423cb332f0b6c86f4e26b0ef8e /Zend/zend_alloc.h
parent7eb6bd1311a815ec23eb7cf06f6214f4a2d5895a (diff)
downloadphp-git-162bf9e802b3d5aec43b6cdcb6ea87169923076a.tar.gz
Reimplemented ability to get debug info (C source file and line number) in phpdbg without hacks and ABI breaks.
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);