#| -*-Scheme-*-
-$Id: gcnote.scm,v 14.10 1993/10/21 11:49:44 cph Exp $
+$Id: gcnote.scm,v 14.11 1995/04/24 23:22:19 adams Exp $
Copyright (c) 1988-93 Massachusetts Institute of Technology
(else (error "Can't grab GC statistics hook")))))
unspecific)
+(define (set-gc-notification! #!optional on?)
+ (let ((on? (if (default-object? on?) #T on?)))
+ (set! hook/record-statistic!
+ (let ((current hook/record-statistic!))
+ (if (or (eq? current gc-notification)
+ (eq? current default/record-statistic!))
+ (if on?
+ gc-notification
+ default/record-statistic!)
+ (error "Can't grab GC statistics hook"))))
+ unspecific))
+
(define (with-gc-notification! notify? thunk)
(fluid-let ((hook/record-statistic!
(if notify? gc-notification default/record-statistic!)))
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.254 1995/04/23 05:43:50 cph Exp $
+$Id: runtime.pkg,v 14.255 1995/04/24 23:22:30 adams Exp $
Copyright (c) 1988-95 Massachusetts Institute of Technology
(export ()
gc-statistic->string
print-gc-statistics
+ set-gc-notification!
toggle-gc-notification!
with-gc-notification!))
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.254 1995/04/23 05:43:50 cph Exp $
+$Id: runtime.pkg,v 14.255 1995/04/24 23:22:30 adams Exp $
Copyright (c) 1988-95 Massachusetts Institute of Technology
(export ()
gc-statistic->string
print-gc-statistics
+ set-gc-notification!
toggle-gc-notification!
with-gc-notification!))