On Wednesday, 18 October 2017 at 15:39:43 UTC, Steven
Schveighoffer wrote:
On 10/18/17 1:40 AM, Tony wrote:
On Tuesday, 17 October 2017 at 13:27:24 UTC, Steven
Schveighoffer wrote:
I don't know what "allocations" represents, but reserve
actually calls gc_malloc, and the others do not (the s
On 10/18/17 1:40 AM, Tony wrote:
On Tuesday, 17 October 2017 at 13:27:24 UTC, Steven Schveighoffer wrote:
I don't know what "allocations" represents, but reserve actually calls
gc_malloc, and the others do not (the space is available to expand
into the block). There should be only one alloca
On Tuesday, 17 October 2017 at 13:27:24 UTC, Steven Schveighoffer
wrote:
I don't know what "allocations" represents, but reserve
actually calls gc_malloc, and the others do not (the space is
available to expand into the block). There should be only one
allocation IMO.
-Steve
So there sh
On 10/17/17 2:14 AM, Tony wrote:
Found this unanswered question on StackOverflow.
This program:
import std.stdio;
void add(ref int[] data)
{
data ~= 1;
data ~= 2;
}
void main()
{
int[] a;
writeln("capacity:",a.capacity);
auto cap = a.reserve(1000); // allocated may be