]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/data_heap.hpp
VM: Refactor data_heap* to Factor style
[factor.git] / vm / data_heap.hpp
index 2be2cab93df1877fb438d6a1cf2a9f26f33bf6df..b2e8dfb9308f279ab8b904e725ace48ca1e6f8e1 100644 (file)
@@ -1,57 +1,54 @@
-namespace factor
-{
+namespace factor {
 
 struct data_heap {
-       cell start;
-
-       cell young_size;
-       cell aging_size;
-       cell tenured_size;
-
-       segment *seg;
-
-       nursery_space *nursery;
-       aging_space *aging;
-       aging_space *aging_semispace;
-       tenured_space *tenured;
-
-       card *cards;
-       card *cards_end;
-
-       card_deck *decks;
-       card_deck *decks_end;
-       
-       explicit data_heap(cell young_size, cell aging_size, cell tenured_size);
-       ~data_heap();
-       data_heap *grow(cell requested_size);
-       template<typename Generation> void clear_cards(Generation *gen);
-       template<typename Generation> void clear_decks(Generation *gen);
-       void reset_generation(nursery_space *gen);
-       void reset_generation(aging_space *gen);
-       void reset_generation(tenured_space *gen);
-       bool high_fragmentation_p();
-       bool low_memory_p();
-       void mark_all_cards();
-       cell high_water_mark() {
-               return nursery->size + aging->size;
-       }
+  cell start;
+
+  cell young_size;
+  cell aging_size;
+  cell tenured_size;
+
+  segment* seg;
+
+  nursery_space* nursery;
+  aging_space* aging;
+  aging_space* aging_semispace;
+  tenured_space* tenured;
+
+  card* cards;
+  card* cards_end;
+
+  card_deck* decks;
+  card_deck* decks_end;
+
+  explicit data_heap(cell young_size, cell aging_size, cell tenured_size);
+  ~data_heap();
+  data_heap* grow(cell requested_size);
+  template <typename Generation> void clear_cards(Generation* gen);
+  template <typename Generation> void clear_decks(Generation* gen);
+  void reset_generation(nursery_space* gen);
+  void reset_generation(aging_space* gen);
+  void reset_generation(tenured_space* gen);
+  bool high_fragmentation_p();
+  bool low_memory_p();
+  void mark_all_cards();
+  cell high_water_mark() { return nursery->size + aging->size; }
 };
 
 struct data_heap_room {
-       cell nursery_size;
-       cell nursery_occupied;
-       cell nursery_free;
-       cell aging_size;
-       cell aging_occupied;
-       cell aging_free;
-       cell tenured_size;
-       cell tenured_occupied;
-       cell tenured_total_free;
-       cell tenured_contiguous_free;
-       cell tenured_free_block_count;
-       cell cards;
-       cell decks;
-       cell mark_stack;
+  cell nursery_size;
+  cell nursery_occupied;
+  cell nursery_free;
+  cell aging_size;
+  cell aging_occupied;
+  cell aging_free;
+  cell tenured_size;
+  cell tenured_occupied;
+  cell tenured_total_free;
+  cell tenured_contiguous_free;
+  cell tenured_free_block_count;
+  cell cards;
+  cell decks;
+  cell mark_stack;
 };
 
 }