diff --git a/extension/tests/xhprof_012.phpt b/extension/tests/xhprof_012.phpt new file mode 100644 index 00000000..ef815e47 --- /dev/null +++ b/extension/tests/xhprof_012.phpt @@ -0,0 +1,32 @@ +--TEST-- +XHProf: Memory Leak in Ignored Functions +Author: epriestley +--FILE-- + array($large))); +xhprof_disable(); +unset($large); + +xhprof_enable(); +xhprof_disable(); + +$new = memory_get_usage(); + +$missing = ($new - $old); + +if ($missing >= (1024 * 1024 * 16)) { + echo "LEAKED A LOT OF MEMORY\n"; +} else { + echo "DID NOT LEAK A LOT OF MEMORY\n"; +} + +?> +--EXPECTF-- +DID NOT LEAK A LOT OF MEMORY