On Wednesday, 13 November 2013 at 00:33:17 UTC, Andrei Alexandrescu wrote:

* Arrays: some weird length (like 17), and also starting at size_t.max minus the memory occupied by the array.

This question probably reflects the fact that I do not know how arrays are implemented by the D runtime. But wouldn't shrinking an array cause it's memory to have the possibility of being reclaimed/reapportioned? At least I expect that to happen in normal D code any time I change an array's length to make it smaller; I figure the GC might kick in at any point after that and reclaim the formerly used memory. Of course, inside an allocator such functionality could be short cut so that the GC does not touch it, and shrinking an array is simply a notational adjustment.

The idea behind a reproducable way to fail all seems good. I am just concerned that this part might have a performance impact.

No?

Joseph

Reply via email to