docs: protected void resizeTo(long newCapacity) {
          final long oldCapacity = capacity();
          final long oldAllocatedSize = HEADER_SIZE + oldCapacity * slotLength;
          final MemoryAllocator oldMalloc;
          final long oldAddress;
          if (auxMalloc != null) {
              final long size = size();
              oldAddress = move(baseAddress, oldCapacity, malloc, auxMalloc);
              oldMalloc = auxMalloc;
              auxAllocateAndAdjustFields(oldAddress, size, oldCapacity, newCapacity);
          } else {
              oldMalloc = malloc;
              oldAddress = baseAddress;
              allocateArrayAndAdjustFields(size(), newCapacity);
          }
          rehash(oldCapacity, oldAddress);
          oldMalloc.free(oldAddress - HEADER_SIZE, oldAllocatedSize);
      }