File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Expand file tree Collapse file tree 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> {
254254 // In GenImmix, young objects are not allocated in ImmixSpace directly.
255255 #[ cfg( feature = "vo_bit" ) ]
256256 mixed_age : false ,
257- never_move_objects : cfg ! ( feature = "immix_non_moving" ) ,
257+ never_move_objects : false ,
258258 } ,
259259 ) ;
260260
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ impl<VM: VMBinding> Immix<VM> {
140140 unlog_object_when_traced : false ,
141141 #[ cfg( feature = "vo_bit" ) ]
142142 mixed_age : false ,
143- never_move_objects : cfg ! ( feature = "immix_non_moving" ) ,
143+ never_move_objects : false ,
144144 } ,
145145 )
146146 }
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ impl<VM: VMBinding> StickyImmix<VM> {
329329 // In StickyImmix, both young and old objects are allocated in the ImmixSpace.
330330 #[ cfg( feature = "vo_bit" ) ]
331331 mixed_age : true ,
332- never_move_objects : cfg ! ( feature = "immix_non_moving" ) ,
332+ never_move_objects : false ,
333333 } ,
334334 ) ;
335335 Self {
Original file line number Diff line number Diff line change @@ -278,23 +278,25 @@ impl<VM: VMBinding> ImmixSpace<VM> {
278278
279279 pub fn new (
280280 args : crate :: policy:: space:: PlanCreateSpaceArgs < VM > ,
281- space_args : ImmixSpaceArgs ,
281+ mut space_args : ImmixSpaceArgs ,
282282 ) -> 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-
291283 if space_args. unlog_object_when_traced {
292284 assert ! (
293285 args. constraints. needs_log_bit,
294286 "Invalid args when the plan does not use log bit"
295287 ) ;
296288 }
297289
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+
298300 // validate features
299301 if super :: BLOCK_ONLY {
300302 assert ! (
You can’t perform that action at this time.
0 commit comments