code: public void freePage(MemoryBlock page, MemoryConsumer consumer) {
      assert (page.pageNumber != MemoryBlock.NO_PAGE_NUMBER) :
        "Called freePage() on memory that wasn't allocated with allocatePage()";
      assert (page.pageNumber != MemoryBlock.FREED_IN_ALLOCATOR_PAGE_NUMBER) :
        "Called freePage() on a memory block that has already been freed";
      assert (page.pageNumber != MemoryBlock.FREED_IN_TMM_PAGE_NUMBER) :
              "Called freePage() on a memory block that has already been freed";
      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();
      // Clear the page number before passing the block to the MemoryAllocator's free().
      // Doing this allows the MemoryAllocator to detect when a TaskMemoryManager-managed
      // page has been inappropriately directly freed without calling TMM.freePage().
      page.pageNumber = MemoryBlock.FREED_IN_TMM_PAGE_NUMBER;
      memoryManager.tungstenMemoryAllocator().free(page);
      releaseExecutionMemory(pageSize, consumer);
    }
docs: Free a block of memory allocated via {@link TaskMemoryManager#allocatePage}.