public void freePage(MemoryBlock page, MemoryConsumer consumer) {
        assert (page.pageNumber != -1) :
                "Called freePage() on memory that wasn't allocated with allocatePage()";
        assert (allocatedPages.get(page.pageNumber));
        pageTable[page.pageNumber] = null;
        synchronized (this) {
            allocatedPages.clear(page.pageNumber);
        }
        if (logger.isTraceEnabled()) {
            logger.trace("Freed page number {} ({} bytes)", page.pageNumber, page.size());
        }
        long pageSize = page.size();
        memoryManager.tungstenMemoryAllocator().free(page);
        releaseExecutionMemory(pageSize, tungstenMemoryMode, consumer);
    }
Free a block of memory allocated via {@link TaskMemoryManager#allocatePage}.
indexr-query-opt/src/main/java/org/apache/spark/memory/TaskMemoryManager.java