From b9e5870a7fcb59f0d49021c2e476f187bef6b466 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Sat, 17 May 2025 11:34:53 +1000 Subject: [PATCH] Added reset --- .../java/me/cortex/voxy/common/util/AllocationArena.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/me/cortex/voxy/common/util/AllocationArena.java b/src/main/java/me/cortex/voxy/common/util/AllocationArena.java index 59f101e1..5bc595db 100644 --- a/src/main/java/me/cortex/voxy/common/util/AllocationArena.java +++ b/src/main/java/me/cortex/voxy/common/util/AllocationArena.java @@ -26,6 +26,14 @@ public class AllocationArena { //Flags private boolean resized;//If the required memory of the entire buffer grew + public void reset() { + this.FREE.clear(); + this.TAKEN.clear(); + this.sizeLimit = Long.MAX_VALUE; + this.totalSize = 0; + this.resized = false; + } + //Gets and resets the resized flag public boolean getResetResized() { boolean ret = this.resized;