emacs-devel
[Top][All Lists]
Advanced

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

Re: Memory again


From: Eli Zaretskii
Subject: Re: Memory again
Date: Wed, 07 Dec 2011 02:52:17 -0500

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Tue, 06 Dec 2011 15:25:59 -0500
> 
> > Anyway, the theory behind this experiment is that inserting lots of
> > text in small chunks causes massive reallocations, one each for every
> > time you fill the gap, and this fragmentation of the memory, which
> > then makes it impossible to release more than the last 60MB.
> 
> I doubt that's what happens.  I think instead that the extra memory is
> what is used by the various text properties we add.

You are, in fact, saying that fontifying a 60-MByte compilation buffer
creates text properties and other supporting data structures that can
accrue to a total of 2G bytes.  I find this extremely hard to believe.
A simple calculation will show that a file that has 1 million lines
with 5 different faces (warning, line number, column number,
underline, default) per line needs only a few million intervals -- how
can this require 2G bytes of memory?



reply via email to

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