Q: how does one determine how much memory an arbitrary lisp object is consuming?
Example use case: I've got a hash table holding lists of strings. I'm curious about how much memory it's using.
Q: how does one determine how much memory an arbitrary lisp object is consuming?
Example use case: I've got a hash table holding lists of strings. I'm curious about how much memory it's using.
How to determine the size? By looking at the C source code whee those objects are defined (e.g. src/lisp.h
).
IIRC in the case of a hash-table, you should count more or less 6 words (32 or 64bit, depending on your system) per element in the hash-table.