Log in / create account | Login with OpenID
DocForge
Programmer's Wiki

PHP/memory get peak usage

From DocForge

< PHP

memory_get_peak_usage is a PHP function which returns the peak amount of memory allocated to the running PHP script.

int memory_get_peak_usage ([ bool $real_usage ] )

The $real_usage parameter, if true, will have the function return the actual peak memory allocated by the system. If false, the default, only the memory internally used by emalloc() is returned.

The return value is the maximum number of bytes of memory used.

[edit] Availability

Since PHP v5.2.0.

[edit] See Also

Do you have information or insights to contribute to this article? Please feel free to edit this page. Ask questions or contribute to the discussion on this article's talk page.