public synchronized long getUnallocatedSpace() {
    return (maxBlockCount - allocatedBlockCount) * (long) blockSize;
  }
Returns the current number of unallocated bytes on this disk. This is the maximum number of
additional bytes that could be allocated and does not reflect the number of bytes currently
actually cached in the disk.
jimfs/src/main/java/com/google/common/jimfs/HeapDisk.java