Mail Archives: djgpp-workers/2002/06/16/02:05:50
On Sat, 15 Jun 2002 sandmann AT clio DOT rice DOT edu wrote:
> > > But I wouldn't expect EMACS to be calling sbrk() when CTRL is being
> > > pressed?
> >
> > Why not? Emacs is a memory-intensive program: Lisp objects are
> > constantly being born and once in a while deleted by the garbage
> > collector. It's quite possible that CTRL is being pressed while
> > Emacs called sbrk, isn't it?
>
> I wouldn't be expecting Emacs to be doing anything unless I was giving
> it instructions to do something
Emacs does do things even when it's idle. There are many features that
are run by the idle loop, such as syntax highlighting, garbage
collection, display of the time in the mode line, auto-saving, etc.
> If it was doing something I would
> expect it to be using and freeing memory, not constantly growing that
> memory such that a call to sbrk() was required.
That depends on what it's doing: when the free memory isn't enough for
something, it calls sbrk. Memory footprint growth is typical for the
beginning of the session, when many Lisp objects are created but only a
few are garbage-collected.
> Thus, I don't understand Emacs; to fix it someone who has an idea what
> it's doing needs to write a small test program which shows the same
> symptoms.
I think we need first to establish whether the problem happens inside
sbrk. To do that, it's perhaps best to find the shortest sequence of
actions that causes Emacs to die, and then trace it with a debugger, like
Laurynas did for the other similar problem.
- Raw text -