![]() |
fwrite slowdown problem
Hi,
I have a probelm with fwrite function. I use it to write large chunk of binary data to 24-bit bitmap(.bmp) files of resolution 2400x1500. In the program below, I read an image 1700.bmp and write the same to 1.bmp. I perform this infinite number of times. At the beginning, the writting is fast. But after about 25 images, the writting becomes too slow. When I remove the fwrite statement, the program executes very fast. So fwrite is the culprit. But I have to make the program run fast and at the same speed. Why is this problem caused and how to rectify it? I have copied the program below: Code:
#include <stdio.h> |
Re: fwrite slowdown problem
Is your stack big enough to contain a 10MB array?
|
Re: fwrite slowdown problem
great i will try this
|
| All times are GMT +5.5. The time now is 05:09. |