summaryrefslogtreecommitdiff
path: root/ext/standard/var.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/var.c')
-rw-r--r--ext/standard/var.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 4b5c7dc5d8..e68a5a5400 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -677,6 +677,15 @@ PHP_FUNCTION(unserialize)
/* }}} */
+#if MEMORY_LIMIT
+/* {{{ proto int get_memory_usage()
+ Returns the allocated by PHP memory */
+PHP_FUNCTION(get_memory_usage) {
+ RETURN_LONG(AG(allocated_memory));
+}
+/* }}} */
+#endif
+
/*
* Local variables:
* tab-width: 4