presto-main/src/main/java/io/prestosql/operator/index/IndexSnapshotBuilder.java/IndexSnapshotBuilder/tryAddPage
class IndexSnapshotBuilder:    public boolean tryAddPage(Page page)
    {
        memoryInBytes += page.getSizeInBytes();
        if (isMemoryExceeded()) {
            return false;
        }
        pages.add(page);
        return true;
    }