code: def _allocate_disk_space(self):
          # type: (Descriptor) -> None
          
          with self._meta_lock:
              if self._allocated or self._offset != 0:
                  return
              # set local path view
              allocatesize = self._set_final_path_view()
              # check if path already exists and is of sufficient size
              if (not self.final_path.exists() or
                      self.final_path.stat().st_size != allocatesize):
                  # create parent path
                  self.final_path.parent.mkdir(
                      mode=0o750, parents=True, exist_ok=True)
                  # allocate file
                  with self.final_path.open('wb') as fd:
                      if allocatesize > 0:
                          try:
                              os.posix_fallocate(fd.fileno(), 0, allocatesize)
                          except AttributeError:
                              fd.seek(allocatesize - 1)
                              fd.write(b'\0')
              self._allocated = True
docs: Perform file allocation (possibly sparse)
          :param Descriptor self: this