Lines Matching refs:ZT_G

27 	if (ZT_G(custom_malloc)) {  in observe_malloc()
28 zend_mm_set_heap(ZT_G(original_heap)); in observe_malloc()
29 ptr = ZT_G(custom_malloc)(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); in observe_malloc()
30 zend_mm_set_heap(ZT_G(observed_heap)); in observe_malloc()
32 …ptr = _zend_mm_alloc(ZT_G(original_heap), size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_C… in observe_malloc()
40 if (ZT_G(custom_free)) in observe_free()
42 zend_mm_set_heap(ZT_G(original_heap)); in observe_free()
43 ZT_G(custom_free)(ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); in observe_free()
44 zend_mm_set_heap(ZT_G(observed_heap)); in observe_free()
46 _zend_mm_free(ZT_G(original_heap), ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); in observe_free()
54 if (ZT_G(custom_realloc)) in observe_realloc()
56 zend_mm_set_heap(ZT_G(original_heap)); in observe_realloc()
57 new_ptr = ZT_G(custom_realloc)(ptr, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); in observe_realloc()
58 zend_mm_set_heap(ZT_G(observed_heap)); in observe_realloc()
60 …new_ptr = _zend_mm_realloc(ZT_G(original_heap), ptr, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_O… in observe_realloc()
69 if (ZT_G(custom_gc)) { in observe_gc()
70 zend_mm_set_heap(ZT_G(original_heap)); in observe_gc()
71 size = ZT_G(custom_gc)(); in observe_gc()
72 zend_mm_set_heap(ZT_G(observed_heap)); in observe_gc()
74 size = zend_mm_gc(ZT_G(original_heap)); in observe_gc()
82 if (ZT_G(custom_shutdown)) { in observe_shutdown()
83 zend_mm_set_heap(ZT_G(original_heap)); in observe_shutdown()
84 ZT_G(custom_shutdown)(full, silent); in observe_shutdown()
85 zend_mm_set_heap(ZT_G(observed_heap)); in observe_shutdown()
87 zend_mm_shutdown(ZT_G(original_heap), full, silent); in observe_shutdown()
94 if (ZT_G(observed_heap) != NULL) { in zend_test_mm_custom_handlers_init()
97 ZT_G(original_heap) = zend_mm_get_heap(); in zend_test_mm_custom_handlers_init()
98 if (zend_mm_is_custom_heap(ZT_G(original_heap))) { in zend_test_mm_custom_handlers_init()
100 ZT_G(original_heap), in zend_test_mm_custom_handlers_init()
101 &ZT_G(custom_malloc), in zend_test_mm_custom_handlers_init()
102 &ZT_G(custom_free), in zend_test_mm_custom_handlers_init()
103 &ZT_G(custom_realloc), in zend_test_mm_custom_handlers_init()
104 &ZT_G(custom_gc), in zend_test_mm_custom_handlers_init()
105 &ZT_G(custom_shutdown) in zend_test_mm_custom_handlers_init()
108 …handlers at %p, %p, %p, %p, %p\n", ZT_G(custom_malloc), ZT_G(custom_free), ZT_G(custom_realloc), Z… in zend_test_mm_custom_handlers_init()
109 ZT_G(observed_heap) = zend_mm_startup(); in zend_test_mm_custom_handlers_init()
111 ZT_G(observed_heap), in zend_test_mm_custom_handlers_init()
118 zend_mm_set_heap(ZT_G(observed_heap)); in zend_test_mm_custom_handlers_init()
119 printf("Heap at %p installed in ZendMM (orig at %p)\n", ZT_G(observed_heap), ZT_G(original_heap)); in zend_test_mm_custom_handlers_init()
124 if (ZT_G(observed_heap) == NULL) { in zend_test_mm_custom_handlers_shutdown()
127 zend_mm_set_heap(ZT_G(original_heap)); in zend_test_mm_custom_handlers_shutdown()
129 ZT_G(observed_heap), in zend_test_mm_custom_handlers_shutdown()
136 zend_mm_shutdown(ZT_G(observed_heap), true, true); in zend_test_mm_custom_handlers_shutdown()
137 ZT_G(observed_heap) = NULL; in zend_test_mm_custom_handlers_shutdown()
138 printf("Prev heap at %p restored in ZendMM\n", ZT_G(original_heap)); in zend_test_mm_custom_handlers_shutdown()
148 if (ZT_G(zend_mm_custom_handlers_enabled)) { in zend_test_mm_custom_handlers_rinit()