fwrite consuming lot of memory help !!!!
- From: "phil" <philip.panicker@xxxxxxxxx>
- Date: 4 Aug 2005 21:51:03 -0700
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
.
- Follow-Ups:
- Re: fwrite consuming lot of memory help !!!!
- From: Lawrence Kirby
- Re: fwrite consuming lot of memory help !!!!
- From: Chris Hulbert
- Re: fwrite consuming lot of memory help !!!!
- From: Walter Roberson
- Re: fwrite consuming lot of memory help !!!!
- Prev by Date: Re: Array assignment via struct
- Next by Date: Re: fwrite consuming lot of memory help !!!!
- Previous by thread: File Merge
- Next by thread: Re: fwrite consuming lot of memory help !!!!
- Index(es):
Relevant Pages
|
|