(time ...) : how to report memory use, if one would implement it? #194
jpellegrini
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Usually, Lisps will report not only time consumed by some code when wrapped around
(time ...)
; they will also report some form of memory use. Number of cons cells created, number of allocated bytes etc.STklos could do that, and it would actually be easy, but I have one question:
Thread A allocates 50 bytes. Then A creates thread B. Then B allocates 60 bytes.
If I use
time
in threads A and B, how many bytes should A report as allocated? It sown 50, or 110?(B will obviously only report 60)
This could be a simple thing to implement -- change the
STk_must_*
stuff, making them also update some counters, which would be thread-local (or global, whenTHREAD_NONE
). But I'm not sure how we should do the accounting.(I'm asking because I'd like to use this to verify memory performance of some SRFIs. 132 and 194 are important candidates).
Beta Was this translation helpful? Give feedback.
All reactions