]> gitweb.factorcode.org Git - factor.git/blob - vm/data_gc.hpp
411c4d19fe2383a82319b756a4fe3114b9c4267f
[factor.git] / vm / data_gc.hpp
1 namespace factor
2 {
3
4 /* statistics */
5 struct gc_stats {
6         cell collections;
7         u64 gc_time;
8         u64 max_gc_time;
9         cell object_count;
10         u64 bytes_copied;
11 };
12
13 /* We leave this many bytes free at the top of the nursery so that inline
14 allocation (which does not call GC because of possible roots in volatile
15 registers) does not run out of memory */
16 static const cell allot_buffer_zone = 1024;
17
18 PRIMITIVE(gc);
19 PRIMITIVE(gc_stats);
20 PRIMITIVE(clear_gc_stats);
21 PRIMITIVE(become);
22 struct factor_vm;
23 VM_ASM_API void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm);
24
25 }