private boolean acquireNewPage(long required) {
        try {
            currentPage = allocatePage(required);
        } catch (OutOfMemoryError e) {
            return false;
        }
        dataPages.add(currentPage);
        Platform.putInt(currentPage.getBaseObject(), currentPage.getBaseOffset(), 0);
        pageCursor = 4;
        return true;
    }
Acquire a new page from the memory manager.

@return whether there is enough space to allocate the new page.
indexr-query-opt/src/main/java/org/apache/spark/unsafe/map/BytesToBytesMap.java