File tree 4 files changed +14
-12
lines changed
4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ impl<VM: VMBinding> GenImmix<VM> {
254
254
// In GenImmix, young objects are not allocated in ImmixSpace directly.
255
255
#[ cfg( feature = "vo_bit" ) ]
256
256
mixed_age : false ,
257
- never_move_objects : cfg ! ( feature = "immix_non_moving" ) ,
257
+ never_move_objects : false ,
258
258
} ,
259
259
) ;
260
260
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ impl<VM: VMBinding> Immix<VM> {
140
140
unlog_object_when_traced : false ,
141
141
#[ cfg( feature = "vo_bit" ) ]
142
142
mixed_age : false ,
143
- never_move_objects : cfg ! ( feature = "immix_non_moving" ) ,
143
+ never_move_objects : false ,
144
144
} ,
145
145
)
146
146
}
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ impl<VM: VMBinding> StickyImmix<VM> {
329
329
// In StickyImmix, both young and old objects are allocated in the ImmixSpace.
330
330
#[ cfg( feature = "vo_bit" ) ]
331
331
mixed_age : true ,
332
- never_move_objects : cfg ! ( feature = "immix_non_moving" ) ,
332
+ never_move_objects : false ,
333
333
} ,
334
334
) ;
335
335
Self {
Original file line number Diff line number Diff line change @@ -278,23 +278,25 @@ impl<VM: VMBinding> ImmixSpace<VM> {
278
278
279
279
pub fn new (
280
280
args : crate :: policy:: space:: PlanCreateSpaceArgs < VM > ,
281
- space_args : ImmixSpaceArgs ,
281
+ mut space_args : ImmixSpaceArgs ,
282
282
) -> Self {
283
- if space_args. never_move_objects {
284
- info ! (
285
- "Creating non-moving ImmixSpace: {}. Block size: 2^{}" ,
286
- args. name,
287
- Block :: LOG_BYTES
288
- ) ;
289
- }
290
-
291
283
if space_args. unlog_object_when_traced {
292
284
assert ! (
293
285
args. constraints. needs_log_bit,
294
286
"Invalid args when the plan does not use log bit"
295
287
) ;
296
288
}
297
289
290
+ // Make sure we override the space args if we force non moving Immix
291
+ if cfg ! ( feature = "immix_non_moving" ) && !space_args. never_move_objects {
292
+ info ! (
293
+ "Overriding never_moves_objects for Immix Space {}, as the immix_non_moving feature is set. Block size: 2^{}" ,
294
+ args. name,
295
+ Block :: LOG_BYTES ,
296
+ ) ;
297
+ space_args. never_move_objects = true ;
298
+ }
299
+
298
300
// validate features
299
301
if super :: BLOCK_ONLY {
300
302
assert ! (
You can’t perform that action at this time.
0 commit comments