Steven Schveighoffer:

it has to do with the fact that the minimum heap block is 16-bytes (or 4 ints wide). Extra 3 bytes is probably for overhead and static data.

If instead of p = [i].ptr; you did p = new int; *p = i;

You would get the same exact behavior.

No way around this, unless you want to do custom allocators.

Right, maybe you told me the same thing lot of time ago. Thank you for saying such things again. 16 bytes are a lot, so there's not a lot of point in creating very small trees nodes :-)

Bye,
bearophile

Reply via email to