No. *EVEN* with an "ugly malloc", you'll still over allocate (see above).

----
int* ptr = cast(int*) malloc(513 * int.sizeof);
int[] arr = ptr[0 .. 513];

writeln(arr.length, "::", arr.capacity);
----

Output:
513::0

Where is the over allocation?

Reply via email to