cs: faster (current-memory-use 'cumulative)
A slow `(current-memory-use 'cumulative)` could causes misleading results in `PLT_EXPANDER_TIMES` output for frequent actions.
This commit is contained in:
parent
d61f56c77f
commit
247c985702
|
@ -102,7 +102,7 @@
|
||||||
[(mode)
|
[(mode)
|
||||||
(cond
|
(cond
|
||||||
[(not mode) (bytes-allocated)]
|
[(not mode) (bytes-allocated)]
|
||||||
[(eq? mode 'cumulative) (sstats-bytes (statistics))]
|
[(eq? mode 'cumulative) (+ (bytes-deallocated) (bytes-allocated))]
|
||||||
;; must be a custodian; hook is reposnsible for complaining if not
|
;; must be a custodian; hook is reposnsible for complaining if not
|
||||||
[else (custodian-memory-use mode (bytes-allocated))])]))
|
[else (custodian-memory-use mode (bytes-allocated))])]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user