Mail Archives: djgpp-workers/2005/04/10/13:31:12
On Sun, 10 Apr 2005 13:56:01 +0200 (CEST), ams AT ludd DOT ltu DOT se wrote:
>Anyway, after hitting C-c I do have a 4,294,950,912 bytes big file
>with contents that match what I wrote ("012345678\n" repeated
>eternally). Note that the size I get it 4GB-2^14 which seems a little
>low, but as I C-c-ed the programm we can't be sure where the missing
>2^14-2 bytes went. (My belief is that FAT32 should be able to support
>file sizes <= 4GB-2.)
Last buffer isn't written at all: you might want to try adding
fflush() every 1000 bytes from 4 294 950 000, every 100 bytes from
4 294 960 000, and maybe every 10 bytes from 4 294 963 200, as you may
only get up to 4GB-4KB == 4 294 963 200 written, but may get to 4GB-6
== 4 294 967 290 (limit due to writing 10 bytes a time), and might
have to write and fflush a byte at a time to get further than that.
You could try something like:
< count += ret;
> count += ret;
> if ((count >= 4294950000ULL && !(count%1000ULL))
> || (count >= 4294960000ULL && !(count%100ULL))
> || (count >= 4294963200ULL && !(count%10ULL)))
> fflush(f);
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian DOT Inglis AT CSi DOT com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
fake address use address above to reply
- Raw text -