]> gitweb.factorcode.org Git - factor.git/blob - vm/code_heap.hpp
vm: split off free_list_allocator from heap class, rename zone to bump_allocator
[factor.git] / vm / code_heap.hpp
1 namespace factor
2 {
3
4 struct code_heap {
5         /* The actual memory area */
6         segment *seg;
7
8         /* Memory allocator */
9         free_list_allocator<heap_block> *allocator;
10
11         /* Set of blocks which need full relocation. */
12         std::set<code_block *> needs_fixup;
13
14         /* Code blocks which may reference objects in the nursery */
15         std::set<code_block *> points_to_nursery;
16
17         /* Code blocks which may reference objects in aging space or the nursery */
18         std::set<code_block *> points_to_aging;
19
20         explicit code_heap(cell size);
21         ~code_heap();
22         void write_barrier(code_block *compiled);
23         void clear_remembered_set();
24         bool needs_fixup_p(code_block *compiled);
25         bool marked_p(heap_block *compiled);
26         void set_marked_p(code_block *compiled);
27         void clear_mark_bits();
28         void code_heap_free(code_block *compiled);
29         code_block *forward_code_block(code_block *compiled);
30 };
31
32 }