- (let ((start-ticks (get-internal-ticks))
- (start-consing (get-bytes-consed))
- (*enclosed-ticks* 0)
- (*enclosed-consing* 0)
- (*enclosed-profiles* 0))
+ (let* ((start-ticks (get-internal-ticks))
+ (*enclosed-ticks* 0)
+ (*enclosed-consing* 0)
+ (*enclosed-profiles* 0)
+ (nbf-pcounter *n-bytes-freed-or-purified-pcounter*)
+ ;; Typically NBF-PCOUNTER will represent a bignum.
+ ;; In general we don't want to cons up a new
+ ;; bignum for every encapsulated call, so instead
+ ;; we keep track of the PCOUNTER internals, so
+ ;; that as long as we only cons small amounts,
+ ;; we'll almost always just do fixnum arithmetic.
+ ;; (And for encapsulated functions which cons
+ ;; large amounts, then a single extra consed
+ ;; bignum tends to be proportionally negligible.)
+ (nbf0-integer (pcounter-integer nbf-pcounter))
+ (nbf0-fixnum (pcounter-fixnum nbf-pcounter))
+ (dynamic-usage-0 (sb-kernel:dynamic-usage)))