diff --git a/vm/data_gc.cpp b/vm/data_gc.cpp index ac0402b47d..408a70ea5e 100755 --- a/vm/data_gc.cpp +++ b/vm/data_gc.cpp @@ -3,36 +3,6 @@ namespace factor { -/* used during garbage collection only */ -zone *newspace; -bool performing_gc; -bool performing_compaction; -cell collecting_gen; - -/* if true, we are collecting aging space for the second time, so if it is still -full, we go on to collect tenured */ -bool collecting_aging_again; - -/* in case a generation fills up in the middle of a gc, we jump back -up to try collecting the next generation. */ -jmp_buf gc_jmp; - -gc_stats stats[max_gen_count]; -u64 cards_scanned; -u64 decks_scanned; -u64 card_scan_time; -cell code_heap_scans; - -/* What generation was being collected when copy_code_heap_roots() was last -called? Until the next call to add_code_block(), future -collections of younger generations don't have to touch the code -heap. */ -cell last_code_heap_scan; - -/* sometimes we grow the heap */ -bool growing_data_heap; -data_heap *old_data_heap; - void factorvm::init_data_gc() { performing_gc = false; diff --git a/vm/data_gc.hpp b/vm/data_gc.hpp index 47d2657587..68b2b4a936 100755 --- a/vm/data_gc.hpp +++ b/vm/data_gc.hpp @@ -10,14 +10,6 @@ struct gc_stats { u64 bytes_copied; }; -extern zone *newspace; - -extern bool performing_compaction; -extern cell collecting_gen; -extern bool collecting_aging_again; - -extern cell last_code_heap_scan; - void init_data_gc(); void gc(); @@ -41,8 +33,6 @@ void clear_gc_stats(); PRIMITIVE(clear_gc_stats); PRIMITIVE(become); -extern bool growing_data_heap; - VM_ASM_API void inline_gc(cell *gc_roots_base, cell gc_roots_size); diff --git a/vm/vm.hpp b/vm/vm.hpp index a58ac1ad9e..59d9d277f8 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -170,6 +170,36 @@ struct factorvm { //data_gc + /* used during garbage collection only */ + zone *newspace; + bool performing_gc; + bool performing_compaction; + cell collecting_gen; + + /* if true, we collecting aging space for the second time, so if it is still + full, we go on to collect tenured */ + bool collecting_aging_again; + + /* in case a generation fills up in the middle of a gc, we jump back + up to try collecting the next generation. */ + jmp_buf gc_jmp; + + gc_stats stats[max_gen_count]; + u64 cards_scanned; + u64 decks_scanned; + u64 card_scan_time; + cell code_heap_scans; + + /* What generation was being collected when copy_code_heap_roots() was last + called? Until the next call to add_code_block(), future + collections of younger generations don't have to touch the code + heap. */ + cell last_code_heap_scan; + + /* sometimes we grow the heap */ + bool growing_data_heap; + data_heap *old_data_heap; + void init_data_gc(); object *copy_untagged_object_impl(object *pointer, cell size); object *copy_object_impl(object *untagged);