mirror of
https://github.com/php/php-src.git
synced 2026-04-26 17:38:14 +02:00
Merge branch 'PHP-7.3'
* PHP-7.3: Allow switching back to Zend MM heap.
This commit is contained in:
+8
-4
@@ -2737,10 +2737,14 @@ ZEND_API void zend_mm_set_custom_handlers(zend_mm_heap *heap,
|
||||
#if ZEND_MM_CUSTOM
|
||||
zend_mm_heap *_heap = (zend_mm_heap*)heap;
|
||||
|
||||
_heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_STD;
|
||||
_heap->custom_heap.std._malloc = _malloc;
|
||||
_heap->custom_heap.std._free = _free;
|
||||
_heap->custom_heap.std._realloc = _realloc;
|
||||
if (!_malloc && !_free && !_realloc) {
|
||||
_heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_NONE;
|
||||
} else {
|
||||
_heap->use_custom_heap = ZEND_MM_CUSTOM_HEAP_STD;
|
||||
_heap->custom_heap.std._malloc = _malloc;
|
||||
_heap->custom_heap.std._free = _free;
|
||||
_heap->custom_heap.std._realloc = _realloc;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user