void assertNoBuffersLocked() {
    pagesAllocationLock.lock();
    try {
      pagesAccessLock.lock();
      try {
        for (DirectBufferWrapper value : pagesByPageId.values()) {
          if (value.isLocked()) {
            throw new AssertionError();
          }
        }
        for (DirectBufferWrapper value : pagesToRemoveByPageId.values()) {
          if (value.isLocked()) {
            throw new AssertionError();
          }
        }
      }
      finally {
        pagesAccessLock.unlock();
      }
    }
    finally {
      pagesAllocationLock.unlock();
    }
  }
void assertNoBuffersLocked()