From 72fc62f0824fa85833ed43645431213f3ca0f186 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 5 Dec 2019 15:07:18 +0300 Subject: [PATCH] Fix bug that causes heap to grow without need --- core/src/main/java/org/teavm/runtime/GC.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/org/teavm/runtime/GC.java b/core/src/main/java/org/teavm/runtime/GC.java index c7fc2fbf6..a1b8e4747 100644 --- a/core/src/main/java/org/teavm/runtime/GC.java +++ b/core/src/main/java/org/teavm/runtime/GC.java @@ -212,6 +212,7 @@ public final class GC { if (size <= ptr.value.size) { return true; } + ptr = Structure.add(FreeChunkHolder.class, ptr, 1); } return false; }