Where can find fix length array memory layout document
Daniel Kozak
kozzi11 at gmail.com
Tue Jun 18 12:38:52 UTC 2019
On Tue, Jun 18, 2019 at 2:30 PM lili via Digitalmars-d-learn <
digitalmars-d-learn at puremagic.com> wrote:
> Hi guys:
> Is the Dlang fix-length array alloc on stack? when a test
> writeln([1]).sizeof //16
> writeln([2]).sizeof //16
> Why, What is the fix-length array memory layout.
>
When you do [1] without staticArray it will be automaticaly change to array
slice which consist of pointer to data (8bytes on 64bit) and length of
array again 8byte on 64bit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20190618/a8568e9c/attachment.html>
More information about the Digitalmars-d-learn
mailing list