File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,11 @@ impl Block {
247
247
if prev_line_is_marked {
248
248
holes += 1 ;
249
249
}
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
+ }
251
255
#[ cfg( feature = "immix_zero_on_release" ) ]
252
256
crate :: util:: memory:: zero ( line. start ( ) , Line :: BYTES ) ;
253
257
Original file line number Diff line number Diff line change @@ -298,6 +298,9 @@ impl<VM: VMBinding> ImmixAllocator<VM> {
298
298
block. start( ) ,
299
299
block. end( )
300
300
) ;
301
+ // Bulk clear stale line mark state
302
+ Line :: MARK_TABLE
303
+ . bzero_metadata ( block. start ( ) , crate :: policy:: immix:: block:: Block :: BYTES ) ;
301
304
if self . request_for_large {
302
305
self . large_bump_pointer . cursor = block. start ( ) ;
303
306
self . large_bump_pointer . limit = block. end ( ) ;
You can’t perform that action at this time.
0 commit comments