void allocate() {
      slidingWindow.waitUntilInsideWindow(id);
      try {
        activeSegments.acquire();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        throwFatalException(e);
      }
      synchronized (usedSegments) {
        usedSegments.set(id);
      }
      result.complete(ByteBuffer.allocate(1 << segmentBits));
    }
A segment of the storage file that threads can update in parallel, and can be flushed to disk when all threads are
done writing to it.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/ArrayLongLongMapMmap.java