2009-05-04 02:46:13 -04:00
|
|
|
namespace factor
|
|
|
|
|
{
|
|
|
|
|
|
2009-10-15 06:51:11 -04:00
|
|
|
enum gc_op {
|
|
|
|
|
collect_nursery_op,
|
|
|
|
|
collect_aging_op,
|
|
|
|
|
collect_to_tenured_op,
|
|
|
|
|
collect_full_op,
|
2009-10-25 15:02:14 -04:00
|
|
|
collect_compact_op,
|
2009-10-15 06:51:11 -04:00
|
|
|
collect_growing_heap_op
|
|
|
|
|
};
|
|
|
|
|
|
2009-10-03 09:47:05 -04:00
|
|
|
struct gc_state {
|
2009-10-15 06:51:11 -04:00
|
|
|
gc_op op;
|
2009-10-03 09:47:05 -04:00
|
|
|
u64 start_time;
|
2009-10-05 04:27:28 -04:00
|
|
|
jmp_buf gc_unwind;
|
|
|
|
|
|
2009-10-15 06:51:11 -04:00
|
|
|
explicit gc_state(gc_op op_);
|
2009-10-03 09:47:05 -04:00
|
|
|
~gc_state();
|
|
|
|
|
};
|
|
|
|
|
|
2009-10-18 21:31:59 -04:00
|
|
|
VM_C_API void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *parent);
|
2009-05-04 02:00:30 -04:00
|
|
|
|
2009-05-04 02:46:13 -04:00
|
|
|
}
|