summaryrefslogtreecommitdiff
path: root/Zend/zend_gc.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-06-13 11:10:17 +0300
committerDmitry Stogov <dmitry@zend.com>2018-06-13 11:10:17 +0300
commit2afc83732c1eb416acabace042eb0f5384bea721 (patch)
tree8569b7d23b3490504fe31762a346b990c58d0177 /Zend/zend_gc.h
parent609385bbf8fc82f334778bdfef5e16b7a3bd72c6 (diff)
downloadphp-git-2afc83732c1eb416acabace042eb0f5384bea721.tar.gz
Allow access to some garbage collection internals (Benjamin Eberlei)
Diffstat (limited to 'Zend/zend_gc.h')
-rw-r--r--Zend/zend_gc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h
index 9328e2c59c..f1bd7a7b92 100644
--- a/Zend/zend_gc.h
+++ b/Zend/zend_gc.h
@@ -23,6 +23,13 @@
#define ZEND_GC_H
BEGIN_EXTERN_C()
+
+typedef struct _zend_gc_status {
+ uint32_t gc_runs;
+ uint32_t collected;
+ uint32_t gc_threshold;
+} zend_gc_status;
+
ZEND_API extern int (*gc_collect_cycles)(void);
ZEND_API void ZEND_FASTCALL gc_possible_root(zend_refcounted *ref);
@@ -39,6 +46,8 @@ ZEND_API zend_bool gc_protected(void);
/* The default implementation of the gc_collect_cycles callback. */
ZEND_API int zend_gc_collect_cycles(void);
+ZEND_API void zend_gc_get_status(zend_gc_status *status);
+
void gc_globals_ctor(void);
void gc_globals_dtor(void);
void gc_reset(void);