2009-05-04 02:46:13 -04:00
|
|
|
namespace factor
|
|
|
|
{
|
2009-09-25 21:32:00 -04:00
|
|
|
|
2009-10-20 16:15:05 -04:00
|
|
|
struct code_heap {
|
|
|
|
/* The actual memory area */
|
|
|
|
segment *seg;
|
|
|
|
|
|
|
|
/* Memory allocator */
|
|
|
|
free_list_allocator<heap_block> *allocator;
|
|
|
|
|
2009-10-06 06:52:45 -04:00
|
|
|
/* Set of blocks which need full relocation. */
|
2009-10-09 02:37:45 -04:00
|
|
|
std::set<code_block *> needs_fixup;
|
2009-10-06 06:52:45 -04:00
|
|
|
|
2009-10-09 00:10:32 -04:00
|
|
|
/* Code blocks which may reference objects in the nursery */
|
|
|
|
std::set<code_block *> points_to_nursery;
|
|
|
|
|
|
|
|
/* Code blocks which may reference objects in aging space or the nursery */
|
|
|
|
std::set<code_block *> points_to_aging;
|
2009-10-06 05:36:34 -04:00
|
|
|
|
2009-10-20 16:15:05 -04:00
|
|
|
explicit code_heap(cell size);
|
|
|
|
~code_heap();
|
2009-10-06 05:36:34 -04:00
|
|
|
void write_barrier(code_block *compiled);
|
2009-10-16 03:55:02 -04:00
|
|
|
void clear_remembered_set();
|
2009-10-06 06:52:45 -04:00
|
|
|
bool needs_fixup_p(code_block *compiled);
|
2009-10-20 16:15:05 -04:00
|
|
|
bool marked_p(heap_block *compiled);
|
|
|
|
void set_marked_p(code_block *compiled);
|
|
|
|
void clear_mark_bits();
|
2009-10-06 05:36:34 -04:00
|
|
|
void code_heap_free(code_block *compiled);
|
2009-10-03 09:47:05 -04:00
|
|
|
};
|
|
|
|
|
2009-05-04 02:46:13 -04:00
|
|
|
}
|