cs: small memory-accounting simplification

Remove an unneeded accounting hook.
This commit is contained in:
Matthew Flatt 2020-04-16 13:44:43 -06:00
parent 4256214981
commit 8145434fa7
2 changed files with 2 additions and 9 deletions

View File

@ -189,10 +189,6 @@
;; ----------------------------------------
;; Any value wrapped as `strongly-reachable-for-accounting` will
;; be `cons`ed instead of `weak-cons`ed for accounting purposes
(define-record-type strongly-reachable-for-accounting (fields content))
(define (weaken-accounting-roots roots)
(let loop ([roots roots])
(cond
@ -202,8 +198,6 @@
[rest (loop (cdr roots))])
(cond
[(thread? root) (cons root rest)]
[(strongly-reachable-for-accounting? root)
(cons (strongly-reachable-for-accounting-content root) rest)]
[else
(weak-cons root rest)]))])))

View File

@ -94,9 +94,8 @@
(finish-proc result)))))
;; Must be called within an engine, used for memory accounting:
(define (current-place-roots)
(make-strongly-reachable-for-accounting
(list (place-registers)
(current-engine-thread-cell-values))))]
(list (place-registers)
(current-engine-thread-cell-values)))]
[else
(define (place-enabled?) #f)
(define (fork-place thunk finish-proc) #f)