Skip to content

Commit 516ea04

Browse files
document magic number
1 parent c559eae commit 516ea04

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/zend_test/test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ static PHP_INI_MH(OnUpdateZendTestObserveOplineInZendMM)
413413
int int_value = zend_ini_parse_bool(new_value);
414414

415415
if (int_value == 1) {
416+
// `zend_mm_heap` is a private struct, so we have not way to find the
417+
// actual size, but 4096 bytes should be enough
416418
ZT_G(zend_test_heap) = malloc(4096);
417419
memset(ZT_G(zend_test_heap), 0, 4096);
418420
zend_mm_set_custom_handlers(

0 commit comments

Comments
 (0)