cs: sync with Chez Scheme update

The Chez Scheme change avoids a leak while collecting in counting
mode, which is used by Racket's memory-accounting mode.

Also, add a small repair for 4256214981.
This commit is contained in:
Matthew Flatt 2020-04-16 17:25:04 -06:00
parent 8145434fa7
commit fb677d9569
5 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,7 @@
(define collection 'multi)
(define version "7.7.0.1")
(define version "7.7.0.2")
(define deps `("racket-lib"
["racket" #:version ,version]))

View File

@ -2,7 +2,7 @@
;; Check to make we're using a build of Chez Scheme
;; that has all the features we need.
(define-values (need-maj need-min need-sub need-dev)
(values 9 5 3 25))
(values 9 5 3 26))
(unless (guard (x [else #f]) (eval 'scheme-fork-version-number))
(error 'compile-file

View File

@ -115,7 +115,7 @@
;; that value may include underused pages that have locked objects.
;; Using just `post-allocated` is too small, because it may force an
;; immediate major GC too soon. Split the difference.
(set! trigger-major-gc-allocated (* GC-TRIGGER-FACTOR post-allocated))
(set! trigger-major-gc-allocated (* GC-TRIGGER-FACTOR (- post-allocated (bytes-finalized))))
(set! trigger-major-gc-allocated+overhead (* GC-TRIGGER-FACTOR post-allocated+overhead)))
(update-eq-hash-code-table-size!)
(update-struct-procs-table-sizes!)

View File

@ -16,7 +16,7 @@
#define MZSCHEME_VERSION_X 7
#define MZSCHEME_VERSION_Y 7
#define MZSCHEME_VERSION_Z 0
#define MZSCHEME_VERSION_W 1
#define MZSCHEME_VERSION_W 2
/* A level of indirection makes `#` work as needed: */
#define AS_a_STR_HELPER(x) #x

View File

@ -570,6 +570,7 @@
(set-custodian-memory-limits! c new-limits)
(when (and (pair? old-limits)
(or (null? new-limits)
(not (custodian-gc-roots c))
(zero? (hash-count (custodian-gc-roots c)))))
(hash-remove! custodians-with-limits c))
(or any-limits? (pair? new-limits))))