]> gitweb.factorcode.org Git - factor.git/blob - vm/data_heap.hpp
VM: Remove exec bit from VM source files
[factor.git] / vm / data_heap.hpp
1 namespace factor
2 {
3
4 struct data_heap {
5         cell start;
6
7         cell young_size;
8         cell aging_size;
9         cell tenured_size;
10
11         segment *seg;
12
13         nursery_space *nursery;
14         aging_space *aging;
15         aging_space *aging_semispace;
16         tenured_space *tenured;
17
18         card *cards;
19         card *cards_end;
20
21         card_deck *decks;
22         card_deck *decks_end;
23         
24         explicit data_heap(cell young_size, cell aging_size, cell tenured_size);
25         ~data_heap();
26         data_heap *grow(cell requested_size);
27         template<typename Generation> void clear_cards(Generation *gen);
28         template<typename Generation> void clear_decks(Generation *gen);
29         void reset_generation(nursery_space *gen);
30         void reset_generation(aging_space *gen);
31         void reset_generation(tenured_space *gen);
32         bool high_fragmentation_p();
33         bool low_memory_p();
34         void mark_all_cards();
35         cell high_water_mark() {
36                 return nursery->size + aging->size;
37         }
38 };
39
40 struct data_heap_room {
41         cell nursery_size;
42         cell nursery_occupied;
43         cell nursery_free;
44         cell aging_size;
45         cell aging_occupied;
46         cell aging_free;
47         cell tenured_size;
48         cell tenured_occupied;
49         cell tenured_total_free;
50         cell tenured_contiguous_free;
51         cell tenured_free_block_count;
52         cell cards;
53         cell decks;
54         cell mark_stack;
55 };
56
57 }