Generational mark and sweep GC.
This commit is contained in:
@@ -23,16 +23,26 @@
|
||||
#ifndef ECMA_GC_H
|
||||
#define ECMA_GC_H
|
||||
|
||||
/**
|
||||
* Garbage collector interface
|
||||
*/
|
||||
|
||||
#include "ecma-globals.h"
|
||||
|
||||
/**
|
||||
* GC generation identifier
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ECMA_GC_GEN_0, /**< generation 0 */
|
||||
ECMA_GC_GEN_1, /**< generation 1 */
|
||||
ECMA_GC_GEN_2, /**< generation 2 */
|
||||
ECMA_GC_GEN_COUNT /**< generations' number */
|
||||
} ecma_gc_gen_t;
|
||||
|
||||
extern void ecma_gc_init( void);
|
||||
extern void ecma_init_gc_info(ecma_object_t *object_p);
|
||||
extern void ecma_ref_object(ecma_object_t *object_p);
|
||||
extern void ecma_deref_object(ecma_object_t *object_p);
|
||||
extern void ecma_gc_run( void);
|
||||
extern void ecma_gc_update_may_ref_younger_object_flag_by_value( ecma_object_t *obj_p, ecma_value_t value);
|
||||
extern void ecma_gc_update_may_ref_younger_object_flag_by_object( ecma_object_t *obj_p, ecma_object_t *ref_obj_p);
|
||||
extern void ecma_gc_run( ecma_gc_gen_t max_gen_to_collect);
|
||||
|
||||
#endif /* !ECMA_GC_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user