Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion: Preallocated file open
#11
FWIW such 'preallocate' functionality has benefits beyond just the potential to reduce fragmentation of the underlying file - it's generally an almost instant operation and can be used to ensure there is enough space on the disk to fit your file. If you're writing a 4GB file, it would be much nicer to be able to preallocate the 4GB of space before you do any work and get a quick failure if there is not enough vs. have it fail after you've spent a long time writing that data.

The only thing on my mind if we did add such a thing is that I think it would make more sense as a separate `PREALLOCATE` command which takes a file number, rather than another setting on `OPEN` itself. I'm not sure if that would work with how Windows makes you do it though, I'd have to check (on Linux that's fine since `fallocate()` is a separate function anyway).
Reply


Messages In This Thread
Suggestion: Preallocated file open - by doppler - 01-09-2023, 01:01 AM
RE: Suggestion: Preallocated file open - by DSMan195276 - 01-09-2023, 07:33 PM



Users browsing this thread: 10 Guest(s)