Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!AI.MIT.EDU!kingdon From: kingdon@AI.MIT.EDU (Jim Kingdon) Newsgroups: gnu.gdb.bug Subject: gdb3.5 & malloc(3c) Message-ID: <9002261822.AA00297@pogo> Date: 26 Feb 90 18:22:44 GMT References: <31297@bigtex.cactus.org> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 24 OK, kids, here's the story on malloc(). GDB 3.5, if built as distributed makes 4088 byte malloc's in obstack.c. This is very bad, because such a GDB uses the range-checking version of malloc, which causes 4088 byte requests to in fact occupy 8192 bytes. The next release of GDB 3 will fix this by using 4072 byte requests instead. Mike Haertel has written a new malloc for GNU, which will be used in GDB version 4 (and emacs version 19). I'm not distributing it in GDB version 3 because it has not been extensively tested and therefore might be buggy. gdb doesn't have a bug as far as I am concerned, although one fix might be to use a special "malloc" for reading in the symbol table, or to just use brk(2). Obstacks are used for the symbol table, which (if the bug described above is fixed) supposedly should provide good performance. Not that I'm sure anyone has looked at it closely for improvements in memory usage. In the meantime, someone should volunteer to fix GNU malloc. I guess if people want to play with the new GNU malloc I can make a copy available for FTP. Send me mail if interested.