File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,11 @@ impl Block {
247247 if prev_line_is_marked {
248248 holes += 1 ;
249249 }
250-
250+ // We need to clear the line mark state at least twice in every 128 GC
251+ // otherwise, the line mark state of the last GC will stick around
252+ if line_mark_state > Line :: MAX_MARK_STATE - 2 {
253+ line. mark ( 0 ) ;
254+ }
251255 #[ cfg( feature = "immix_zero_on_release" ) ]
252256 crate :: util:: memory:: zero ( line. start ( ) , Line :: BYTES ) ;
253257
Original file line number Diff line number Diff line change @@ -298,6 +298,8 @@ impl<VM: VMBinding> ImmixAllocator<VM> {
298298 block. start( ) ,
299299 block. end( )
300300 ) ;
301+ // Bulk clear stale line mark state
302+ Line :: MARK_TABLE . bzero_metadata ( block. start ( ) , Block :: BYTES ) ;
301303 if self . request_for_large {
302304 self . large_bump_pointer . cursor = block. start ( ) ;
303305 self . large_bump_pointer . limit = block. end ( ) ;
You can’t perform that action at this time.
0 commit comments