Hi ,
I am running a C/C++ program on a solaris 5.8 machine. This parituclar application has a module which saves data to a file. The module uses fwrite() function to save data.
The fwrite function write about 500 MB of data to a file. The problem which I am facing is, the memory consumtion of the process increases during the fwrite but does not decrease once the fwrite is over.
I tried fflush(filepointer) after the fwrite but did not help.
The fwrite function writes all the data in once single fwrite() statement. I initially thought the increase in memory was because of this. So I tried writing data in smaller chunks of sizes 100 MB and 50 MB but still the memory utilization of the process does not decreases once the fwrite is over.
As a result a lot of the main memory is being eaten by this process and thus making the system very slow.
Please help me .
Thanks in advance
ajphaj