presto-hive/src/main/java/io/prestosql/plugin/hive/util/SortBuffer.java/SortBuffer/add
class SortBuffer:    public void add(Page page)
    {
        checkState(canAdd(page), "page buffer is full");
        pages.add(page);
        usedMemoryBytes += page.getRetainedSizeInBytes();
        rowCount = addExact(rowCount, page.getPositionCount());
    }