Skip to content

Commit c82caa7

Browse files
author
François Baldassari
committed
Initlialize ecma gc state on jerry init
JerryScript-DCO-1.0-Signed-off-by: François Baldassari [email protected]
1 parent 6e687fa commit c82caa7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

jerry-core/ecma/base/ecma-gc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ ecma_gc_init (void)
242242
{
243243
ecma_gc_objects_lists[ECMA_GC_COLOR_WHITE_GRAY] = NULL;
244244
ecma_gc_objects_lists[ECMA_GC_COLOR_BLACK] = NULL;
245+
ecma_gc_visited_flip_flag = false;
246+
ecma_gc_objects_number = 0;
247+
ecma_gc_new_objects_since_last_gc = 0;
245248
} /* ecma_gc_init */
246249

247250
/**

jerry-core/ecma/base/ecma-init-finalize.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
void
3535
ecma_init (void)
3636
{
37+
ecma_gc_init ();
3738
ecma_init_builtins ();
3839
ecma_lcache_init ();
3940
ecma_init_environment ();

0 commit comments

Comments
 (0)