pub(crate) fn collect(&mut self) {
        let allocation_cache = ALLOCATOR.sorted_cache();
        let (data_segment_start, data_segment_end) = unsafe { get_data_segment_range() };
        let mut colcx = CollectionCtxt {
            allocation_cache,
            data_segment_start,
            data_segment_end,
        };

        if self.debug_flags.prep_phase {
            self.enter_preparation_phase(&mut colcx);
        }

        COLLECTOR_PHASE.lock().update(CollectorPhase::Marking);

        if self.debug_flags.mark_phase {
            self.enter_mark_phase(&mut colcx);
        }

        if self.debug_flags.sweep_phase {
            self.enter_sweep_phase();
        }

        self.enter_drop_phase();

        self.allocations = 0;

        COLLECTOR_PHASE.lock().update(CollectorPhase::Ready);
    }
/// The only entry-point to a collection. All collection phases must be
/// triggered through this method. It is UB to call any of them
/// individually.
The only entry-point to a collection. All collection phases must be
triggered through this method. It is UB to call any of them
individually.
The only entry - point to a collection . All collection phases must be triggered through this method . It is UB to call any of them individually .
pub(crate) fn collect(&mut self) {
        let allocation_cache = ALLOCATOR.sorted_cache();
        let (data_segment_start, data_segment_end) = unsafe { get_data_segment_range() };
        let mut colcx = CollectionCtxt {
            allocation_cache,
            data_segment_start,
            data_segment_end,
        };
        if self.debug_flags.prep_phase {
            self.enter_preparation_phase(&mut colcx);
        }
        COLLECTOR_PHASE.lock().update(CollectorPhase::Marking);
        if self.debug_flags.mark_phase {
            self.enter_mark_phase(&mut colcx);
        }
        if self.debug_flags.sweep_phase {
            self.enter_sweep_phase();
        }
        self.enter_drop_phase();
        self.allocations = 0;
        COLLECTOR_PHASE.lock().update(CollectorPhase::Ready);
    }
pub ( crate ) fn collect ( & mut self ) { let allocation_cache = ALLOCATOR . sorted_cache ( ) ; let ( data_segment_start , data_segment_end ) = unsafe { get_data_segment_range ( ) } ; let mut colcx = CollectionCtxt { allocation_cache , data_segment_start , data_segment_end , } ; if self . debug_flags . prep_phase { self . enter_preparation_phase ( & mut colcx ) ; } COLLECTOR_PHASE . lock ( ) . update ( CollectorPhase :: Marking ) ; if self . debug_flags . mark_phase { self . enter_mark_phase ( & mut colcx ) ; } if self . debug_flags . sweep_phase { self . enter_sweep_phase ( ) ; } self . enter_drop_phase ( ) ; self . allocations = 0 ; COLLECTOR_PHASE . lock ( ) . update ( CollectorPhase :: Ready ) ; }
The only entry-point to a collection.
The only entry - point to a collection .
&mut self