@@ -825,18 +825,6 @@ impl WasmtimeConfig {
825825 /// these sorts of configurations. For now though it's intended to reflect
826826 /// the current state of the engine's development.
827827 pub ( crate ) fn make_internally_consistent ( & mut self ) {
828- // When using the pooling allocator, GC heap tunables must match memory
829- // tunables.
830- if let InstanceAllocationStrategy :: Pooling ( _) = & self . strategy {
831- self . memory_config . gc_heap_reservation = self . memory_config . memory_reservation ;
832- self . memory_config . gc_heap_guard_size = self . memory_config . memory_guard_size ;
833- self . memory_config . gc_heap_reservation_for_growth =
834- self . memory_config . memory_reservation_for_growth ;
835- // memory_may_move is not in MemoryConfig, but gc_heap_may_move
836- // must not conflict. Set it to None so the default matches.
837- self . memory_config . gc_heap_may_move = None ;
838- }
839-
840828 if !self . signals_based_traps {
841829 let cfg = & mut self . memory_config ;
842830 // Spectre-based heap mitigations require signal handlers so
@@ -870,6 +858,18 @@ impl WasmtimeConfig {
870858 }
871859 }
872860 }
861+
862+ // When using the pooling allocator, GC heap tunables must match memory
863+ // tunables.
864+ if let InstanceAllocationStrategy :: Pooling ( _) = & self . strategy {
865+ self . memory_config . gc_heap_reservation = self . memory_config . memory_reservation ;
866+ self . memory_config . gc_heap_guard_size = self . memory_config . memory_guard_size ;
867+ self . memory_config . gc_heap_reservation_for_growth =
868+ self . memory_config . memory_reservation_for_growth ;
869+ // memory_may_move is not in MemoryConfig, but gc_heap_may_move
870+ // must not conflict. Set it to None so the default matches.
871+ self . memory_config . gc_heap_may_move = None ;
872+ }
873873 }
874874}
875875
0 commit comments