Update #47 - Singleplayer lag fixes

This commit is contained in:
lax1dude
2025-01-19 13:26:27 -08:00
parent 3f5ee57068
commit 1f0d593a8c
2052 changed files with 133581 additions and 2339 deletions

View File

@ -0,0 +1,27 @@
/*
* HPPC
*
* Copyright (C) 2010-2024 Carrot Search s.c. and contributors
* All rights reserved.
*
* Refer to the full license file "LICENSE.txt":
* https://github.com/carrotsearch/hppc/blob/master/LICENSE.txt
*/
package com.carrotsearch.hppc;
/** Resizing (growth) strategy for array-backed buffers. */
public interface ArraySizingStrategy extends Accountable {
/**
* @param currentBufferLength Current size of the array (buffer). This number should comply with
* the strategy's policies (it is a result of initial rounding or further growCalls). It can
* also be zero, indicating the growth from an empty buffer.
* @param elementsCount Number of elements stored in the buffer.
* @param expectedAdditions Expected number of additions (resize hint).
* @return Must return a new size at least as big as to hold <code>
* elementsCount + expectedAdditions</code>.
* @throws BufferAllocationException If the sizing strategy cannot grow the buffer (for example
* due to constraints or memory limits).
*/
int grow(int currentBufferLength, int elementsCount, int expectedAdditions)
throws BufferAllocationException;
}