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: Eli Zaretskii
Subject: Re: Question about memory usage
Date: Wed, 04 Apr 2018 09:08:11 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Tue, 03 Apr 2018 17:18:39 -0400
> 
> >> But shouldn't Emacs reuse the memory from previous loop iteration 
> >> instead of allocating it?
> > That depends on the heap fragmentation and the efficiency of the
> > memory allocating functions to deal with fragmentation.
> 
> The elements of buffer-undo-list in this case are just cons cells (and
> immediate integers and nil), IIUC so I don't see why fragmentation would
> get in the way: the previous cons-cell of the buffer-undo-list of the
> previous iterations, reclaimed by the GC, should be readily reusable.

Cons cells are GCed only when enough of them were consed.



reply via email to

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