presto-main/src/main/java/io/prestosql/execution/buffer/LazyOutputBuffer.java/LazyOutputBuffer/getPeakMemoryUsage
class LazyOutputBuffer:    @Override
    public long getPeakMemoryUsage()
    {
        OutputBuffer outputBuffer;
        synchronized (this) {
            outputBuffer = delegate;
        }

        if (outputBuffer != null) {
            return outputBuffer.getPeakMemoryUsage();
        }
        return 0;
    }