code: public void shutdown() {
  		// -------------------- BEGIN CRITICAL SECTION -------------------
  		synchronized (lock) {
  			if (!isShutDown) {
  				// mark as shutdown and release memory
  				isShutDown = true;
  				numNonAllocatedPages = 0;
  
  				// go over all allocated segments and release them
  				for (Set<MemorySegment> segments : allocatedSegments.values()) {
  					for (MemorySegment seg : segments) {
  						seg.free();
  					}
  				}
  
  				memoryPool.clear();
  			}
  		}
  		// -------------------- END CRITICAL SECTION -------------------
  	}
docs: Shuts the memory manager down, trying to release all the memory it managed. Depending
  on implementation details, the memory does not necessarily become reclaimable by the
  garbage collector, because there might still be references to allocated segments in the
  code that allocated them from the memory manager.