views:

102

answers:

1

How do I figure out how many bytes a defclass object has in Common Lisp?

+2  A: 

You can't do that in portable Common Lisp.

Useful could be the function ROOM. ROOM prints memory statistics and with the argument T it prints them detailed. So you may see a difference before and after some instance creations. Implementations may have specific functions, but you need to check that with the manual or with the support mailing list.

Rainer Joswig
Interesting. (side explanation: I am dealing with lots of things and I'm trying to figure out how to optimize them smaller)
Paul Nathan
Some implementations will let you profile allocation to find the hotspots. That's much a much better way to improve the footprint.
Xach