D array expansion and non-deterministic re-allocation

Denis Koroskin 2korden at gmail.com
Sun Nov 15 23:17:28 PST 2009


On Mon, 16 Nov 2009 09:24:13 +0300, Walter Bright  
<newshound1 at digitalmars.com> wrote:

> Nick Sabalausky wrote:
>> Deterministic? Only in the same sense that "resize or realloc upon  
>> appending" is deterministic.
>
> It's deterministic in the sense that if you run the program again with  
> the same inputs, you will get the same result. This is a highly useful  
> attribute for testing and debugging.
>

It is *non*-deterministic. The decision to reallocate depends (or will  
depend) on LRU and it may be cleared by another thread (e.g. another  
thread may reset it manually or via a GC cycle run).



More information about the Digitalmars-d mailing list