Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: gnu.emacs Subject: Re: garbage collection Message-ID: <36070@bbn.COM> Date: 16 Feb 89 07:01:09 GMT References: Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 22 In-reply-to: montnaro@sprite.steinmetz.ge.com (Skip Montanaro) In article , montnaro@sprite (Skip Montanaro) writes: > Occasionally I have to edit a really huge file >-- many megabytes -- and Emacs gladly mallocs virtual memory to get space >for the file. Unfortunately, when I'm finished editing such a file and have >deleted its buffer, Emacs seems to not give the space back to the operating >system (no matter how many times I garbage collect). > ... > Is this a bug in Emacs or a feature of >the malloc/free system (or something else that isn't obvious to me?) The memory that emacs' garbage collector frees is put onto its free list, but is not returned to the system. At least the garbage collector shouldn't be triggered again for a long time... One thing you might try to train yourself to do is to start a fresh emacs when you are editing one of the big files. Of course this is no help if you need to cut and paste stuff from some other buffer, but if you do this you can exit the big emacs when done with the large file and the prior one will still be small (for large values of small). -- /jr jr@bbn.com or bbn!jr