comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: 'Size of an object
Date: Tue, 11 Sep 2012 18:27:58 +0200
Date: 2012-09-11T18:27:58+02:00	[thread overview]
Message-ID: <xnj2yeybcr27$.w8r0xq5v3vmi.dlg@40tude.net> (raw)
In-Reply-To: 97ff13ad-308a-416f-a300-6c7d9da3d71b@googlegroups.com

On Tue, 11 Sep 2012 08:52:03 -0700 (PDT), Adam Beneschan wrote:

> What would you expect E'Size to be, and why?  In a larger procedure,
> what might you use 'Size on a local variable for; if you wouldn't ever
> use it on a local variable, then what kinds of *objects* (not types or
> subtypes) might you apply 'Size to, and what would you do with the value?

Does the question has an answer? What is the object size when stored in a
register? Do temp copies count, e.g. when passed by copy, loaded into a
cache? Does the memory allocated upon unpacking packed representations
count?

I think that at best, one could say that the object size is an interval
with the upper and lower bound reachable. This interval could used to
estimate container type sizes, though the obtained bounds might turn become
unreachable.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2012-09-17  2:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 15:52 'Size of an object Adam Beneschan
2012-09-11 16:20 ` Micronian Coder
2012-09-11 16:21 ` Vasiliy Molostov
2012-09-11 16:27 ` Dmitry A. Kazakov [this message]
2012-09-11 16:28 ` björn lundin
2012-09-11 17:07 ` Shark8
2012-09-11 18:11 ` AdaMagica
2012-09-11 22:21   ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox