Variable size/Get: Difference between revisions
→Variable Size: New section.
(→{{header|TXR}}: Added) |
(→Variable Size: New section.) |
||
Line 1,199:
19</pre>
The leading bitfield is now deemed to be byte aligned, so the structure is no longer padded for the sake of its alignment.
====Variable Size====
Since the task is worded as being about '''variables''' rather than objects, what we can do is explore the memory costs of a lexical environment.
An empty environment takes up a 16 byte heap record:
<pre>1> (prof (let ()))
(nil 0 16 0)</pre>
Adding a variable to the environment brings in an additional 32 bytes:
<pre>2> (prof (let (a)))
(nil 0 48 0)</pre>
=={{header|UNIX Shell}}==
|