From 8145434fa7255ecfb2084aa9e4f1f6370a584f87 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 16 Apr 2020 13:44:43 -0600 Subject: [PATCH] cs: small memory-accounting simplification Remove an unneeded accounting hook. --- racket/src/cs/rumble/memory.ss | 6 ------ racket/src/cs/rumble/place.ss | 5 ++--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/racket/src/cs/rumble/memory.ss b/racket/src/cs/rumble/memory.ss index 3d11841f6a..38494d8979 100644 --- a/racket/src/cs/rumble/memory.ss +++ b/racket/src/cs/rumble/memory.ss @@ -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)]))]))) diff --git a/racket/src/cs/rumble/place.ss b/racket/src/cs/rumble/place.ss index 72670e2138..f59d5f097f 100644 --- a/racket/src/cs/rumble/place.ss +++ b/racket/src/cs/rumble/place.ss @@ -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)