Join GitHub today
Steps to Reproduce
\Tracy\Debugger::enable(\Tracy\Debugger::DEVELOPMENT); while (true) $a = str_repeat('x', 1024);
Shows the default PHP error output:
Even worse, it shows nothing with
The code that's supposed to make Tracy work even in case of reaching the memory limit doesn't seem to help when the limit is reached by a small allocation.
Is there anything we can do to fix this and let Tracy show the SoD even in this case?
#369 made an effort to solve this, but the issue persists. The problem here is architectural, IMHO it can't be solved by increasing a number. I tried the with reserved memory of 500'000 B as per the pull request, and it made the red screen appear for the above testcase. Splitting the allocations in half made Tracy fail again though:
I think the problem with this is that any solution based on the amount of pre-allocated memory might never be universally good enough.
It's not going to always work because different apps - ultimately - will be needing very various amounts of memory to display the Tracy's blue(red)creen in its entirety; apps with small amount of variables (and other stuff) in them will need considerably less memory to render the bluescreen than huge apps with thousands of variables and instantiated classes.
One fixed number will not going to fit all. IMHO it's more about finding the good balance between:
The original value before my PR was 30 kB. My PR increased it to 500 kB. It might be a good thing to increase it further to, say, 1 MB of reserved memory. But this increasing might go on forever.
Somehow viable option for Tracy might be to allow clients to set the size of the memory that's going to be pre-allocated (presumably doing it prior to the