diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2015-08-04 18:21:05 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2015-08-04 18:21:05 +0300 |
| commit | 668ecaa606b3203311b3329fcbd49b59f715e1e4 (patch) | |
| tree | 03700463bc46c639e07a60e1741ae3a434a11b31 /Zend/zend_builtin_functions.c | |
| parent | ed8d16b173556f8d95c6261dba65d653f64d3920 (diff) | |
| download | php-git-668ecaa606b3203311b3329fcbd49b59f715e1e4.tar.gz | |
Fixed bug #70098 (Real memory usage doesn't decrease)
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 1a5ba2e5dd..526572a882 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -93,6 +93,7 @@ static ZEND_FUNCTION(zend_test_func2); static ZEND_FUNCTION(zend_thread_id); #endif #endif +static ZEND_FUNCTION(gc_mem_caches); static ZEND_FUNCTION(gc_collect_cycles); static ZEND_FUNCTION(gc_enabled); static ZEND_FUNCTION(gc_enable); @@ -321,6 +322,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */ ZEND_FE(zend_thread_id, NULL) #endif #endif + ZEND_FE(gc_mem_caches, arginfo_zend__void) ZEND_FE(gc_collect_cycles, arginfo_zend__void) ZEND_FE(gc_enabled, arginfo_zend__void) ZEND_FE(gc_enable, arginfo_zend__void) @@ -371,6 +373,15 @@ ZEND_FUNCTION(zend_version) } /* }}} */ +/* {{{ proto int gc_mem_caches(void) + Reclaims memory used by MM caches. + Returns number of freed bytes */ +ZEND_FUNCTION(gc_mem_caches) +{ + RETURN_LONG(zend_mm_gc(zend_mm_get_heap())); +} +/* }}} */ + /* {{{ proto int gc_collect_cycles(void) Forces collection of any existing garbage cycles. Returns number of freed zvals */ |
