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