0

I am use Yii2. Who can help? memory_get_usage(true) returns 8-9MB but in Yii Debbuger Memory:58.3MB. How can I fix it?

1 Answers1

0

As shown in this file Yii2-debug tool is using memory_get_peak_usage() function and that is not the same as memory_get_usage() function. according to their respective documentations :

memory_get_peak_usage — Returns the peak of memory allocated by PHP memory_get_usage — Returns the amount of memory allocated to PHP

So the Yii-debugger tool is doing it right by returning the amount of memory being used instead of the amount allocated to php.

You may check this, this and this for more details.

Community
  • 1
  • 1
Salem Ouerdani
  • 7,596
  • 3
  • 40
  • 52