presto-orc/src/main/java/io/prestosql/orc/stream/ByteOutputStream.java/ByteOutputStream/getRetainedBytes
class ByteOutputStream:    @Override
    public long getRetainedBytes()
    {
        // NOTE: we do not include checkpoints because they should be small and it would be annoying to calculate the size
        return INSTANCE_SIZE + buffer.getRetainedSize() + SizeOf.sizeOf(sequenceBuffer);
    }