[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

size-of instance?



I know this is going to be an easy one, but I have looked a few times with
no luck. Is there any way to get the RAM cost of a given instance? Or take
the size-of of a class/type ala C?

It just occurred to me I could gc-room-(setf xx make...)-gc-room, but would
that be an accurate metric? I'll give it a go.

I ask because the easiest way to handle my custom math editor is to make
each character a subclass of view, but I have an internal efficiency
auditor telling me NO WAY! <g>

I am also curious about how big a lambda is, since I am doing a ton of
crazy stuff with little baby lambdas running all over the place, but I
imagine the same answer will cover both.

(I browsed apropos on size. Quite a list. None of the likely candidates
came close, but maybe I am a poor judge of likely <g>.)