(Very) Large Files

I’m trying to get an application to create a file greater than 2 Gig.
I open the file with open64() and I also add the O_LARGEFILE option.
I then start writing to the file using write(). The write always gets an error after writing 2,147,483,647 bytes. Does anyone know anything about this? This is QNX v6.2.

Although the C library and resmgr code is all 64-bit aware, the maximum file size is going to be determined by the underlying filesystem. The QNX4 filesystem (which is the default filesystem under Neutrino) is only 32-bits, so 2GB is the maximum size file possible. With the possible exception of fs-ext2, I don’t think any of the filesystems are currently 64-bit.

At least you could use a FAT32 Partition to create a file of up to 4 GB.

If you keep appending to a file, it can grow bigger then 2 Gig I beleive, but you will have trouble afterwards with reading and seeking.

This does all make a lot of sense. It’s a little distressing that this doesn’t seemed to be mentioned anywhere in the docs, at least not anywhere obvious like in the description of open64. As it turns out, I think I have a very simple way around this limitation for my application.

I think Robert Kertn, wrote a resmgr to handle big files. I can’t find it on his site though.

No you can’t. He’s trying to sell it for $10k :slight_smile:

openqnx.com/PNphpBB2-viewtopic-t5968-.html