[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Size-of instance
- To: Shannon V Spires <svspire@somnet.sandia.gov>
- Subject: Re: Size-of instance
- From: bill@cambridge.apple.com (Bill St. Clair)
- Date: Thu, 18 May 1995 18:10:10 -0400
- Cc: info-mcl@digitool.com, missing@inch.com
- Sender: owner-info-mcl@digitool.com
At 11:24 AM 5/18/95, Shannon V Spires wrote:
>(defmethod sizeof ((me standard-object))
> (* 8 (uvsize me)))
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))))
MCL 3.0 has 4 bytes less vector overhead, so for MCL 3.0
it is:
(defmethod sizeof-3.0 ((me standard-object))
(+ 8 (* 8 (ceiling (1- (uvsize me)) 2))))