This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Upcoming 1.3.2 release


Greg Harvey <Greg.Harvey@thezone.net> writes:

> Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> writes:
> 
> > Greg Badros <gjb@cs.washington.edu> writes:
> > 
> > > That sounds great;  we exchanged email a while back about ability to
> > > register a C function to be invoked at start and end of garbage
> > > collection.  Might that make it into 1.3.2?  It's definitely nice to be
> > > able to provide feedback to the user of an interactive application about 
> > > when garbage collection is occurring.
> > 
> > The new hooks have both Scheme level and C level interfaces.
> > 
> > If we add before-gc-hook and after-gc-hook before 1.3.2 we could warn
> > now about %gc-thunk disappearing in 1.3.4.
> > 
> > Jim?
> > 
> > BTW Has Greg Harvey included these hooks in his sources?
> 
> after-gc-hook, yes. before-gc-hook, at least as a proper hook, is not
> a good idea, since there's no memory left to do anything (if you try
> to run almost any scheme code, you'll get a nice little infinite loop
> thing going... there are a few problems in the current gc itself where
> stuff like scm_error is being called, which evidences the exact same
> thing; I've removed those, to). What it needs is a way to register
> well behaved c functions with the gc, which isn't difficult to write,
> but I haven't gotten around to it yet.

Right-- I'm aware that it'd be a bad idea to call Scheme code from a
GC-start hook.  We want Scwm to be able to have a hard-coded (in C)
behaviour (or perhaps several possible behaviours) to convey to the user 
that garbage collection is taking place. E.g.,

;; no notification
(set-gc-awareness-mode! #f)

;; write msg to port
(set-gc-awareness-mode! (current-output-port)) 

;; display the cursor during the gc
(set-gc-awareness-mode! (create-pixmap-cursor "recycle.xpm")) 

;; others?

Thanks,
Greg B

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]