Do some collection work until either the debt goes down below the target amount or we have finished the gc sweep phase. The unit of "work" here is a byte count of objects either turned black or freed, so to completely collect a heap with 1000 bytes of objects should take 1000 units of work, whatever percentage of them are live or not. In order for this to be safe, at the time of call no `Gc` poin
(
&self,
root: &R,
target_debt: f64,
early_stop: Option<EarlyStop>,
)
| 266 | // |
| 267 | // If we are currently in `Phase::Sleep`, this will transition the collector to `Phase::Mark`. |
| 268 | pub(crate) unsafe fn do_collection<R: Collect + ?Sized>( |
| 269 | &self, |
| 270 | root: &R, |
| 271 | target_debt: f64, |
| 272 | early_stop: Option<EarlyStop>, |
| 273 | ) { |
| 274 | self.do_collection_inner(root, target_debt, early_stop) |
| 275 | } |
| 276 | |
| 277 | fn do_collection_inner<R: Collect + ?Sized>( |
| 278 | &self, |
no test coverage detected