]> gitweb.factorcode.org Git - factor.git/blob - vm/code_heap.hpp
Merge branch 'master' of git://factorcode.org/git/factor
[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<code_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(code_block *compiled);
26         void set_marked_p(code_block *compiled);
27         void clear_mark_bits();
28         void code_heap_free(code_block *compiled);
29 };
30
31 struct code_heap_room {
32         cell size;
33         cell occupied_space;
34         cell total_free;
35         cell contiguous_free;
36         cell free_block_count;
37 };
38
39 }