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

PHP/memory get usage

From DocForge

< PHP

memory_get_usage is a PHP function which returns the amount of memory currently allocated to the running PHP script.

int memory_get_usage ([ bool $real_usage ] )

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

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

[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.