@SuppressWarnings("ArrayToString")
    private void allocArrays(final int size) {
        if (size == (BASE_SIZE * 2)) {
            synchronized (ArraySet.class) {
                if (sTwiceBaseCache != null) {
                    final Object[] array = sTwiceBaseCache;
                    mArray = array;
                    sTwiceBaseCache = (Object[]) array[0];
                    mHashes = (int[]) array[1];
                    array[0] = array[1] = null;
                    sTwiceBaseCacheSize--;
                    if (DEBUG) {
                        System.out.println(TAG + " Retrieving 2x cache " + mHashes + " now have "
                                + sTwiceBaseCacheSize + " entries");
                    }
                    return;
                }
            }
        } else if (size == BASE_SIZE) {
            synchronized (ArraySet.class) {
                if (sBaseCache != null) {
                    final Object[] array = sBaseCache;
                    mArray = array;
                    sBaseCache = (Object[]) array[0];
                    mHashes = (int[]) array[1];
                    array[0] = array[1] = null;
                    sBaseCacheSize--;
                    if (DEBUG) {
                        System.out.println(TAG + " Retrieving 1x cache " + mHashes + " now have "
                                + sBaseCacheSize + " entries");
                    }
                    return;
                }
            }
        }

        mHashes = new int[size];
        mArray = new Object[size];
    }
Caches of small array objects to avoid spamming garbage.  The cache
Object[] variable is a pointer to a linked list of array objects.
The first entry in the array is a pointer to the next array in the
list; the second entry is a pointer to the int[] hash code array for it.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/collection/ArraySet.java