Changing garbage collector to non-generational.

This commit is contained in:
Ruben Ayrapetyan
2015-02-18 20:16:35 +03:00
parent d1f6760f01
commit a751ab4f9d
8 changed files with 59 additions and 352 deletions
+1 -14
View File
@@ -26,24 +26,11 @@
#include "ecma-globals.h"
#include "mem-allocator.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_update_may_ref_younger_object_flag_by_value (ecma_object_t *obj_p, const 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);
extern void ecma_gc_run (void);
extern void ecma_try_to_give_back_some_memory (mem_try_give_memory_back_severity_t severity);
#endif /* !ECMA_GC_H */