@Override
    public String toString() {
        long allocated = sizeBytes - availableMemory.get();
        return "GarbageCollectedMemoryPool{" + Utils.formatBytes(allocated) + "/" + Utils.formatBytes(sizeBytes) + " used in " + buffersInFlight.size() + " buffers}";
    }
An extension of SimpleMemoryPool that tracks allocated buffers and logs an error when they "leak"
(when they are garbage-collected without having been release()ed).
THIS IMPLEMENTATION IS A DEVELOPMENT/DEBUGGING AID AND IS NOT MEANT PRO PRODUCTION USE.
clients/src/main/java/org/apache/kafka/common/memory/GarbageCollectedMemoryPool.java