help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about memory usage


From: Stefan Monnier
Subject: Re: Question about memory usage
Date: Tue, 03 Apr 2018 09:13:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> >> (while t
>> >>    (with-temp-buffer
>> >>      (setq buffer-undo-list nil)
>> >>      (insert "a")))
>> [...]
>> > To answer your question: yes, I think this is expected, given that you
>> > set buffer-undo-list to nil (what is the purpose of that, btw?).  If
>> Hmm... why would setting this var make any significant difference here?
> Because the variable is on/referenced via the stack, I suppose.

I don't follow.  At the end of each iteration of the loop, we kill the
temp buffer, so the effect of having set its buffer-undo-list slot or
not should be negligible (or more specifically: this effect should only
exist until the next GC).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]