Runtime Configuration
The behaviour of these functions is affected by settings in php.ini.
Name | Default | Changeable |
---|---|---|
memtrack.enabled | "0" | PHP_INI_SYSTEM |
memtrack.soft_limit | "0" | PHP_INI_ALL |
memtrack.hard_limit | "0" | PHP_INI_ALL |
memtrack.vm_limit | "0" | PHP_INI_ALL |
memtrack.ignore_functions | "" | PHP_INI_SYSTEM |
Here's a short explanation of the configuration directives.
-
memtrack.enabled
boolean -
Disables or enables the extension. Default value is 0, i.e. disabled.
-
memtrack.soft_limit
int -
Soft memory limit.
The extension checks memory consumption before and after executing an op_array and produces a warning is the difference between the two values is equal to or greater than the soft limit, but only if the function is not ignored.
Setting this option to 0 also disables both soft and hard limit warnings. Default value is 0, i.e. no warnings is produced.
-
memtrack.hard_limit
int -
Hard memory limit.
The extension checks memory consumption before and after executing an op_array and produces a warning is the difference between the two values is equal to or greater than the hard limit, even if the function is ignored. Setting this option to 0 disables hard limit warnings completely. Default value is 0, i.e. no hard limit warnings is produced.
-
memtrack.vm_limit
int -
Virtual memory limit (set on a process).
This limit is checked only on shutdown and a warning is produced if the value is greater than or equal to the limit.
This option is currently supported only on OSes where mallinfo() function is available (i.e. Linux).
-
memtrack.ignore_functions
string -
A comma or whitespace-separated list of functions which are to be ignored by soft_limit. The values are case-insensitive, for class methods use class::method syntax.
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-memtrack.ini.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.