Re: fopen and memory usage

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

 



On 25Sep2007 17:01, aragonx@xxxxxxxxxx <aragonx@xxxxxxxxxx> 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@xxxxxxxxxx> 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.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux