diff --git a/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java b/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java index 7627fab7e..c480682ec 100644 --- a/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java +++ b/core/src/main/java/org/teavm/backend/wasm/WasmTarget.java @@ -661,6 +661,7 @@ public class WasmTarget implements TeaVMTarget { gcMemory -= regionCount * 2; address += regionCount * 2; + address = (address + 4) >> 2 << 2; gcIntrinsic.setHeapAddress(address); gcIntrinsic.setAvailableBytes(gcMemory); }