Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!dcl-cs!aber-cs!pcg From: pcg@aber-cs.UUCP (Piercarlo Grandi) Newsgroups: gnu.gdb.bug Subject: Re: more info on gdb3.5 memory bloat Summary: Caltech derived malloc()s suck... Message-ID: <1659@aber-cs.UUCP> Date: 22 Feb 90 15:01:00 GMT Reply-To: pcg@cs.aber.ac.uk (Piercarlo Grandi) Distribution: gnu Organization: Dept of CS, UCW Aberystwyth (Disclaimer: my statements are purely personal) Lines: 27 In article <9002172100.AA17438@labgre.HP.COM> glenne@HPLSLA.HP.COM (Glenn Engel) writes: Re: previous bug report about gdb using significantly more memory than gdb3.4. When reading my executable's symbol table, malloc is called 841 times to request 4088 bytes. After every one of these 4088 byte malloc calls, the data segment size goes up by 8192 bytes. Maybe you should use the malloc() I have posted time ago in alt.sources. I will be reposting it to comp.sources.misc soon. Malloc()s like the GNU one that are based on the Caltech one use a kind of buddy system, in the vain hope this will make them fast. The only result is that they become much less space efficient. Another thing, entirely different: I will be posting shortly some simple patches to GDB main.c that avoid including readline and company. This library consumes about 30% of the code space of GDB. I don't need it, because I have history processin as a line discipline in my tty driver (thanks to A. Shepherd's CLED). There are also a lot of other solutions to the line editing/history problem, such as using rk, atty, or any editor with shell buffers, and under these readline is useless as well. -- Piercarlo "Peter" Grandi | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcvax!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk