123 void set_soft_reference_policy(bool clear); 124 125 // Non-strong reference processing 126 void process_non_strong_references(); 127 128 // Page allocation 129 ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags); 130 void undo_alloc_page(ZPage* page); 131 void free_page(ZPage* page, bool reclaimed); 132 133 // Uncommit memory 134 uint64_t uncommit(uint64_t delay); 135 136 // Object allocation 137 uintptr_t alloc_tlab(size_t size); 138 uintptr_t alloc_object(size_t size); 139 uintptr_t alloc_object_for_relocation(size_t size); 140 void undo_alloc_object_for_relocation(uintptr_t addr, size_t size); 141 bool is_alloc_stalled() const; 142 void check_out_of_memory(); 143 144 // Marking 145 bool is_object_live(uintptr_t addr) const; 146 bool is_object_strongly_live(uintptr_t addr) const; 147 template <bool finalizable, bool publish> void mark_object(uintptr_t addr); 148 void mark_start(); 149 void mark(bool initial); 150 void mark_flush_and_free(Thread* thread); 151 bool mark_end(); 152 153 // Relocation set 154 void select_relocation_set(); 155 void reset_relocation_set(); 156 157 // Relocation 158 void relocate_start(); 159 uintptr_t relocate_object(uintptr_t addr); 160 uintptr_t remap_object(uintptr_t addr); 161 void relocate(); 162 | 123 void set_soft_reference_policy(bool clear); 124 125 // Non-strong reference processing 126 void process_non_strong_references(); 127 128 // Page allocation 129 ZPage* alloc_page(uint8_t type, size_t size, ZAllocationFlags flags); 130 void undo_alloc_page(ZPage* page); 131 void free_page(ZPage* page, bool reclaimed); 132 133 // Uncommit memory 134 uint64_t uncommit(uint64_t delay); 135 136 // Object allocation 137 uintptr_t alloc_tlab(size_t size); 138 uintptr_t alloc_object(size_t size); 139 uintptr_t alloc_object_for_relocation(size_t size); 140 void undo_alloc_object_for_relocation(uintptr_t addr, size_t size); 141 bool is_alloc_stalled() const; 142 void check_out_of_memory(); 143 void pin_allocating(uintptr_t page_start); 144 void unpin_allocating(uintptr_t page_start); 145 146 // Marking 147 bool is_object_live(uintptr_t addr) const; 148 bool is_object_strongly_live(uintptr_t addr) const; 149 template <bool finalizable, bool publish> void mark_object(uintptr_t addr); 150 void mark_start(); 151 void mark(bool initial); 152 void mark_flush_and_free(Thread* thread); 153 bool mark_end(); 154 155 // Relocation set 156 void select_relocation_set(); 157 void reset_relocation_set(); 158 159 // Relocation 160 void relocate_start(); 161 uintptr_t relocate_object(uintptr_t addr); 162 uintptr_t remap_object(uintptr_t addr); 163 void relocate(); 164 |