com php-src: Added missing API functions: Zend/zend_alloc.c Zend/zend_alloc.h

From: Date: Thu, 09 Jul 2015 09:19:30 +0000
Subject: com php-src: Added missing API functions: Zend/zend_alloc.c Zend/zend_alloc.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87859@lists.php.net to get a copy of this message
Commit: 225bb7049842ea4623ccdda2900efdcc4491fdb0 Author: Dmitry Stogov <dmitry@zend.com> Thu, 9 Jul 2015 12:19:30 +0300 Parents: 0de0c4ace14437071fb8a8690f387a63c0c48003 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=225bb7049842ea4623ccdda2900efdcc4491fdb0 Log: Added missing API functions Changed paths: M Zend/zend_alloc.c M Zend/zend_alloc.h Diff: diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 58e19c1..f0a3b20 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -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*), diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 6c12b42..eebddca 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -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*),

« previous php.cvs (#87859) next »