PATH:
opt
/
cpanel
/
ea-php73
/
root
/
usr
/
include
/
php
/
Zend
/* +----------------------------------------------------------------------+ | Zend Engine | +----------------------------------------------------------------------+ | Copyright (c) 1998-2018 Zend Technologies Ltd. (http://www.zend.com) | +----------------------------------------------------------------------+ | This source file is subject to version 2.00 of the Zend license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.zend.com/license/2_00.txt. | | If you did not receive a copy of the Zend license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@zend.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: David Wang <planetbeing@gmail.com> | | Dmitry Stogov <dmitry@php.net> | +----------------------------------------------------------------------+ */ #ifndef ZEND_GC_H #define ZEND_GC_H BEGIN_EXTERN_C() typedef struct _zend_gc_status { uint32_t runs; uint32_t collected; uint32_t threshold; uint32_t num_roots; } zend_gc_status; ZEND_API extern int (*gc_collect_cycles)(void); ZEND_API void ZEND_FASTCALL gc_possible_root(zend_refcounted *ref); ZEND_API void ZEND_FASTCALL gc_remove_from_buffer(zend_refcounted *ref); /* enable/disable automatic start of GC collection */ ZEND_API zend_bool gc_enable(zend_bool enable); ZEND_API zend_bool gc_enabled(void); /* enable/disable possible root additions */ ZEND_API zend_bool gc_protect(zend_bool protect); 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); END_EXTERN_C() #define GC_REMOVE_FROM_BUFFER(p) do { \ zend_refcounted *_p = (zend_refcounted*)(p); \ if (GC_TYPE_INFO(_p) & GC_INFO_MASK) { \ gc_remove_from_buffer(_p); \ } \ } while (0) #define GC_MAY_LEAK(ref) \ ((GC_TYPE_INFO(ref) & \ (GC_INFO_MASK | (GC_COLLECTABLE << GC_FLAGS_SHIFT))) == \ (GC_COLLECTABLE << GC_FLAGS_SHIFT)) static zend_always_inline void gc_check_possible_root(zend_refcounted *ref) { if (GC_TYPE_INFO(ref) == IS_REFERENCE) { zval *zv = &((zend_reference*)ref)->val; if (!Z_REFCOUNTED_P(zv)) { return; } ref = Z_COUNTED_P(zv); } if (UNEXPECTED(GC_MAY_LEAK(ref))) { gc_possible_root(ref); } } #endif /* ZEND_GC_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode: t * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */
[-] zend_iterators.h
[edit]
[-] zend_highlight.h
[edit]
[-] zend_portability.h
[edit]
[-] zend_istdiostream.h
[edit]
[-] zend_config.nw.h
[edit]
[-] zend_vm_trace_map.h
[edit]
[-] zend_vm.h
[edit]
[-] zend_generators.h
[edit]
[-] zend_modules.h
[edit]
[-] zend_llist.h
[edit]
[-] zend_stack.h
[edit]
[-] zend_arena.h
[edit]
[-] zend_float.h
[edit]
[-] zend_cpuinfo.h
[edit]
[-] zend_smart_str.h
[edit]
[-] zend_vm_trace_handlers.h
[edit]
[-] zend_language_scanner.h
[edit]
[-] zend_dtrace.h
[edit]
[-] zend_range_check.h
[edit]
[+]
..
[-] zend_string.h
[edit]
[-] zend_alloc_sizes.h
[edit]
[-] zend_smart_string_public.h
[edit]
[-] zend_interfaces.h
[edit]
[-] zend_vm_handlers.h
[edit]
[-] zend_operators.h
[edit]
[-] zend_strtod.h
[edit]
[-] zend_language_scanner_defs.h
[edit]
[-] zend_ast.h
[edit]
[-] zend_objects.h
[edit]
[-] zend_stream.h
[edit]
[-] zend_vm_opcodes.h
[edit]
[-] zend_config.h
[edit]
[-] zend_ini_parser.h
[edit]
[-] zend_multibyte.h
[edit]
[-] zend_strtod_int.h
[edit]
[-] zend_language_parser.h
[edit]
[-] zend.h
[edit]
[-] zend_signal.h
[edit]
[-] zend_globals.h
[edit]
[-] zend_constants.h
[edit]
[-] zend_errors.h
[edit]
[-] zend_objects_API.h
[edit]
[-] zend_execute.h
[edit]
[-] zend_object_handlers.h
[edit]
[-] zend_types.h
[edit]
[-] zend_vm_def.h
[edit]
[-] zend_smart_str_public.h
[edit]
[-] zend_gc.h
[edit]
[-] zend_ts_hash.h
[edit]
[-] zend_compile.h
[edit]
[-] zend_ini.h
[edit]
[-] zend_type_info.h
[edit]
[-] zend_long.h
[edit]
[-] zend_extensions.h
[edit]
[-] zend_ini_scanner_defs.h
[edit]
[-] zend_build.h
[edit]
[-] zend_bitset.h
[edit]
[-] zend_exceptions.h
[edit]
[-] zend_API.h
[edit]
[-] zend_hash.h
[edit]
[-] zend_sort.h
[edit]
[-] zend_alloc.h
[edit]
[-] zend_inheritance.h
[edit]
[-] zend_list.h
[edit]
[-] zend_virtual_cwd.h
[edit]
[-] zend_globals_macros.h
[edit]
[-] zend_multiply.h
[edit]
[-] zend_variables.h
[edit]
[-] zend_ptr_stack.h
[edit]
[-] zend_smart_string.h
[edit]
[-] zend_vm_execute.h
[edit]
[-] zend_builtin_functions.h
[edit]
[-] zend_closures.h
[edit]
[-] zend_ini_scanner.h
[edit]