[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Size-of instance
- To: bill@cambridge.apple.com (Bill St. Clair)
- Subject: Re: Size-of instance
- From: Shannon V Spires <svspire@somnet.sandia.gov>
- Date: Thu, 18 May 1995 16:54:35 -0600 (MDT)
- Cc: svspire@somnet.sandia.gov (Shannon V Spires), info-mcl@digitool.com
- In-reply-to: <abe174f905021004e19e@[198.112.74.194]> from "Bill St. Clair" at May 18, 95 06:10:10 pm
- Sender: owner-info-mcl@digitool.com
Bill St. Clair replied:
> That's correct if there are an odd number of slots. If there
> are an even number, however, it will be low by 4 bytes.
> It really should be:
>
> (defmethod sizeof ((me standard-object))
> (+ 8 (* 8 (ceiling (uvsize me) 2))))
>
> [another version was also given for MCL 3.0]
Thanks for the clarification, Bill. But the difference is more profound
than that. Your version of sizeof (above) agrees with the meter-consing result
for every example I've tried so far, while my version would actually
overestimate storage by a factor approaching 2 as the number of slots
grows large!
--
Shannon Spires
svspire@sandia.gov