code: @Override
    public Page allocate(int size, boolean thief, boolean victim, OffHeapStorageArea owner) {
        while (true) {
            processQueue();
            long now = max.get();
            if (now < size) {
              return null;
            } else if (max.compareAndSet(now, now - size)) {
              ByteBuffer buffer;
              try {
                buffer = ByteBuffer.allocateDirect(size);
              } catch (OutOfMemoryError e) {
                return null;
              }
              bufferSizes.put(new PhantomReference<>(buffer, allocatedBuffers), size);
              return new Page(buffer, owner);
            }
        }
    }
docs: Allocates a byte buffer of the given size.
  <p>
  This {@code BufferSource} places no restrictions on the requested size of
  the buffer.