Home >Backend Development >PHP Tutorial >Why does the result of memory_get_usage() change so much_PHP tutorial
Question
Why does the result of memory_get_usage() change so much?
Solution
There is a set of programs. I use memory_Get_usage in the footer to output the memory usage. The results vary greatly. Sometimes it is more than 700k, sometimes it is more than 1m, sometimes it is 5M. After restarting apache, everything is normal again
The output page is the same page, and no new data has been added to the database, so I don't understand it.
Netizens’ suggestions:
Since it is memory usage, there is no constant. . . Look at your task manager, which memory remains unchanged?
Netizens’ suggestions:
But how many times the amount of change
Netizens’ suggestions:
[img]http://tx.icain.cn/png/[/img]
Is it always increasing or changing irregularly
Netizens’ suggestions:
As time accumulates, it becomes larger, but it takes a relatively long time, such as a few hours to change.