B
BlackMagic
I am writing a program in C to parse binary data files in excess of 4
GB. They could conceivably be up to 2 Terabytes long. I am using
fopen and fread to do the file io. I am compiling right now with the
Visual C++ .NET compiler (it's a console application,) but ultimately I
want to compile it for Linux. Using the windows compiler, fread craps
out around the 1 GB mark of my test file, so I'm assuming it has
something to do with pointers not being long enough (32 bits, 4 bytes,
= 4 GB max.) What could the problem be? Is there anything I can do to
read huge files in C? Thanks.
GB. They could conceivably be up to 2 Terabytes long. I am using
fopen and fread to do the file io. I am compiling right now with the
Visual C++ .NET compiler (it's a console application,) but ultimately I
want to compile it for Linux. Using the windows compiler, fread craps
out around the 1 GB mark of my test file, so I'm assuming it has
something to do with pointers not being long enough (32 bits, 4 bytes,
= 4 GB max.) What could the problem be? Is there anything I can do to
read huge files in C? Thanks.