Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!wugate!uunet!mcsun!unido!pcsbst!jkh From: jkh@meepmeep.pcs.com (Jordan K. Hubbard) Newsgroups: comp.emacs Subject: Re: why does GNU Emacs not release memory Message-ID: Date: 27 Oct 89 13:44:36 GMT References: <1989Oct26.150344.10013@talos.uucp> Sender: news@pcsbst.UUCP Organization: PCS Computer Systems, GmbH Lines: 24 In-reply-to: kjones@talos.uucp's message of 26 Oct 89 15:03:44 GMT >If Emacs has to manage the break, this also means that Emacs has to be >intimitely intertwined with malloc and any C (and X!) library routines >that call malloc. Why? It seems that all one would need is a more intelligent malloc library (Emacs already uses its own malloc() anyway) that did storage compaction and break management on free() calls. I didn't say that this was easy, of course, since one cannot just blithely compact just any part of the pool (and expect active pointers into it to remain valid), but you can do a pretty reasonable job if the malloc() requests are mostly for large contiguous blocks (which they are for buffers, at least). I assume that Emacs free's buffers when they're destroyed, no? :-) I think the real answer is that yes, this can be done with a good malloc() package and little or no modification to the application, no it's not easy to do it right (and stay portable) so it has not been done (at least to my knowledge). Jordan -- PCS Computer Systeme GmbH, Munich, West Germany UUCP: pyramid!pcsbst!jkh jkh@meepmeep.pcs.com EUNET: unido!pcsbst!jkh ARPA: jkh@violet.berkeley.edu or hubbard@decwrl.dec.com