[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: fopen and memory usage



On 25Sep2007 17:01, aragonx dcsnow com <aragonx dcsnow com> wrote:
| I was wondering.  If I have a large log file and I use fopen to write to
| it, does it load the entire file into memory before I can write?  If not,
| how do I know how much memory I am wasting opening that file?

No, it doesn't. What purpose would that serve?  It will cost you a buffer
for the I/O (perhaps 8192 bytes) and a FILE control structure.
-- 
Cameron Simpson <cs zip com au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Anarchy may not be the best form of government, but it's better than no
government at all.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]