[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev outofmem() allocating memory
From: |
Gisle Vanem |
Subject: |
Re: lynx-dev outofmem() allocating memory |
Date: |
Wed, 7 Apr 1999 15:54:49 +0200 (CEST) |
Klaus Weide <address@hidden> said:
>> This contradiction happens in libc's `fflush (stdout)'; it doesn't
>> happen while in `fflush(stderr)' (because stdout is line-buffered).
>
> Except that *stderr isn't really the library-provided FILE you would
> expect, if a Trace Log file is in use. So you may have that problem
> even for stderr.
Really, I couldn't find that stderr is defined to something special,
or that setvbuf() is used anywhere.
> Alternatively, outofmem() could try to do some of the cleanups that
> free memory first, before doing anything else. Then there should be
> at least enough memory available for stdio purposes. Too bad that
> memory cleanup has just been disabled in recent patches!
Hear, hear!
>> BTW. YAMD (Yet Another Mallocing Debugger) is for djgpp and Linux.
>> It's available at <http://www.cartsys.com/eldredge/n/yamd/>
> For the purposes of debugging lynx, how does it compare to lynx's
> very own '--enable-find-leaks'?
YAMD is more "low-level"; finds ptr-use after freeing, double-freeing,
under or over-indexing dynamic data etc. I'm not sure 'find-leaks' can
do that.
The disadvantage is that it allocates a page (4kB) for every
allocation! That's why I got outofmem() in the first place.
Gisle V.