www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/06/16/02:05:50

Date: Sun, 16 Jun 2002 07:59:32 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: sandmann AT clio DOT rice DOT edu
cc: djgpp-workers AT delorie DOT com
Subject: Re: unixy sbrk and win2k
In-Reply-To: <10206151815.AA23136@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1020616075158.26367A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019