[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] memory usage of object
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] memory usage of object |
Date: |
Wed, 20 Jun 2007 11:04:05 +0200 |
On 6/20/07, Eduardo Cavazos <address@hidden> wrote:
Hello,
Is there a way to get the memory usage of a datum?
(memory-usage "abcdefg")
or
(memory-usage (lambda (n) (+ n 1)))
(##sys#size X) will return the number slots/words in a vector-like
object, or the number of bytes for a byte-vector like object (i.e. a string)
(It will crash for immediate data). The result will not include nested data
structures.
"object-size" (lolevel unit) will return the number of bytes for all types
of objects, including nested objects. It will detect sharing.
cheers,
felix