public ResourceUsage add(Path path, Storage storage, long amount, String description) {
    return switch (storage) {
      case RAM -> addMemory(amount, description);
      case DIRECT -> addDirectMemory(amount, description);
      case MMAP -> addDisk(path, amount, description);
    };
  }
Requests {@code amount} bytes using {@code storage}.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/ResourceUsage.java