php-memory-profiler: Dump file not being generated and missing function
I’ve installed memprof via pecl on macos on php 7.2, pecl installed memprof 2.1.2
I’ve run a quick test with:
<?php
var_dump(memprof_enabled());
memprof_dump_callgrind(fopen("output", "w"));
$arr = [];
while (true) {
array_push($arr, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
}
memprof_enabled()
works and is true, I also get the output generated by memprof_dump_callgrind
however:
- trying to call
var_dump(memprof_enabled_flags());
givesCall to undefined function memprof_enabled_flags()
- calling the above script with
MEMPROF_PROFILE=dump_on_limit php test.php
doesn’t output the dump on crash
I’ve tried to also change the dump folder to put it in the current working directory, no output
Any idea?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 26 (10 by maintainers)
Thank you for the quick fix @arnaud-lb and, even more so, for making the profiler available to the general community.