
"Kevin Wheatley" <hxpro@cinesite.co.uk> wrote in message news:43269DAA.3667BE36@cinesite.co.uk...
Beman Dawes wrote:
How safe is the assumption that uintmax_t is large enough nowadays for any modern compiler on a system supporting large disks.
Under IRIX, you would use statfs() to get the free space from a path, that returns a structure composed of 2 relavent parts both are of type long:
long f_bsize; /* Block size */ long f_bfree; /* Count of free blocks */
where a long may be either 32 or 64 bits wide... but an unsigend int is only 32 bits so your assumption doesn't hold more than 4GB as a byte count ... which in my business is not enough (~50 MB per frame 24 frames per second, 60 seconds per minute... 2-3 hours per finished film, 10 times that for raw footage, even at 1/2 resolution its ~12MB/frame).
So I'd favour something a little larger... ssize_t keeps pace with the size of a long
For all practical purposes, uintmax_t is 64-bits, so that should be enough.
Our largest single volume is above 6TB, admittedly our *free* space is never that large :-)
Don't we wish:-) Thanks, --Beman