[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev outofmem() allocating memory
From: |
Gisle Vanem |
Subject: |
lynx-dev outofmem() allocating memory |
Date: |
Mon, 5 Apr 1999 22:24:53 +0200 (MET DST) |
Lynx 2.8.2.dev21, djgpp 2.02 (DOS) version.
While building Lynx with a great new mallocing debugger (YAMD),
I found that `outotmem()' indirectly tries to allocate another 16kB !
This contradiction happens in libc's `fflush (stdout)'; it doesn't
happen while in `fflush(stderr)' (because stdout is line-buffered).
It also happens if `printf()' contains a '\n'.
I think this behavior is same under other POSIX compliant targets;
It makes sense to me that `fflush(stdout)' should flush it's buffer
and allocate another.
I suggest that when `LYOutOfMemory' is true, flushing should not
be done. Alternatively, we should use non-buffered `write()' or
print to `stderr'.
BTW. YAMD (Yet Another Mallocing Debugger) is for djgpp and Linux.
It's available at <http://www.cartsys.com/eldredge/n/yamd/>
Gisle V.
- lynx-dev outofmem() allocating memory,
Gisle Vanem <=