Home  >  Article  >  Backend Development  >  Why does the result of memory_get_usage() change so much_PHP tutorial

Why does the result of memory_get_usage() change so much_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:52:101281browse



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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632515.htmlTechArticleQuestion Why does the result of memory_get_usage() change so much? The solution is a set of procedures. I use memory_Get_usage in the footer. Output the memory usage, and the results vary greatly,...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn