diff --git a/reference/memtrack/book.xml b/reference/memtrack/book.xml
new file mode 100644
index 0000000000..3793ffe2e9
--- /dev/null
+++ b/reference/memtrack/book.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+ Memtrack
+ Memtrack
+
+
+ &reftitle.intro;
+
+ The purpose of this extension is to detect the most memory hungry scripts
+ and functions.
+
+
+ memtrack tracks memory consumption in PHP scripts and produces reports
+ (warnings) when the consumption reaches certain levels set by the user.
+ This is achieved by replacing default executor function by a special
+ function which compares memory usage before and after running the
+ original executor - this way we can tell how much the memory usage
+ has changed during the execution of the current part of the code.
+
+
+ Zend Engine runs its executor for each opcode array (op_array),
+ which usually means function, plain script and such, so memtrack doesn't
+ have any noticeable effect on performance.
+
+
+ memtrack doesn't provide any functions, there are only INI directives which
+ allow you to configure the way it should work.
+
+ &warn.experimental;
+
+
+ &reference.memtrack.setup;
+ &reference.memtrack.constants;
+ &reference.memtrack.examples;
+
+
+
+
+
diff --git a/reference/memtrack/configure.xml b/reference/memtrack/configure.xml
new file mode 100644
index 0000000000..62b3f8e2ff
--- /dev/null
+++ b/reference/memtrack/configure.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ &reftitle.install;
+
+ &pecl.info;
+ http://pecl.php.net/package/memtrack
+
+
+
+
+
diff --git a/reference/memtrack/constants.xml b/reference/memtrack/constants.xml
new file mode 100644
index 0000000000..4441c6ff32
--- /dev/null
+++ b/reference/memtrack/constants.xml
@@ -0,0 +1,29 @@
+
+
+
+
+ &reftitle.constants;
+ &no.constants;
+
+
+
+
diff --git a/reference/memtrack/examples.xml b/reference/memtrack/examples.xml
new file mode 100644
index 0000000000..afdd1bbf00
--- /dev/null
+++ b/reference/memtrack/examples.xml
@@ -0,0 +1,67 @@
+
+
+
+
+ &reftitle.examples;
+
+
+ Basic example on using memtrack extension:
+
+ Creating large array in a function
+
+
+]]>
+
+
+
+
+ Run the example with the following command:
+
+
+
+
+ &example.outputs.similar;
+
+
+
+
+
+
+
+
diff --git a/reference/memtrack/ini.xml b/reference/memtrack/ini.xml
new file mode 100644
index 0000000000..751469c9f5
--- /dev/null
+++ b/reference/memtrack/ini.xml
@@ -0,0 +1,165 @@
+
+
+
+ &reftitle.runtime;
+ &extension.runtime;
+
+
+ &ini.php.constants;
+
+
+&ini.descriptions.title;
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+
+
+
diff --git a/reference/memtrack/setup.xml b/reference/memtrack/setup.xml
new file mode 100644
index 0000000000..aa3a7e160e
--- /dev/null
+++ b/reference/memtrack/setup.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ &reftitle.setup;
+
+
+ &reftitle.required;
+ &no.requirement;
+
+
+ &reference.memtrack.configure;
+
+ &reference.memtrack.ini;
+
+
+ &reftitle.resources;
+ &no.resource;
+
+
+
+
+
+