fwrite() misses writing a byte
- From: hemant.gaur@xxxxxxxxx
- Date: Wed, 03 Oct 2007 03:10:22 -0700
I have an application which writes huge number of bytes into the
binary files which is just some marshalled data.
int len = Data.size(); //arrary size
for (int i = 0; i < len; ++i)
fwrite(&Data[i], 1, 1, f);
now after running this for long time and pushing millions of bytes, It
once misses writing the last byte of fData. Then the further push of
bytes is again correct. As i am not using the return value for the
fwrite I think there is some error which could be due to buffer
overrun in the stream. This is hard to reproduce and happening on the
Solaris.
Any help will be appreciated.
.
- Follow-Ups:
- Re: fwrite() misses writing a byte
- From: Keith Thompson
- Re: fwrite() misses writing a byte
- From: Joachim Schmitz
- Re: fwrite() misses writing a byte
- From: jacob navia
- Re: fwrite() misses writing a byte
- From: santosh
- Re: fwrite() misses writing a byte
- Prev by Date: program
- Next by Date: Re: Safety and Interface design
- Previous by thread: program
- Next by thread: Re: fwrite() misses writing a byte
- Index(es):
Relevant Pages
|