Strict capacity of array
FreeSlave
freeslave93 at gmail.com
Fri Dec 13 12:02:58 PST 2013
Thanks for answers.
On Friday, 13 December 2013 at 19:35:01 UTC, Marco Leise wrote:
> Have you tried this?:
>
> import core.memory;
> int[] data = (cast(int*)GC.malloc(size * int.sizeof,
> GC.BlkAttr.NO_SCAN))[0 .. size];
Did you mean GC.BlkAttr.NONE maybe? If I get it right
GC.BlkAttr.NO_SCAN means that memory will never be collected by
GC (i.e. it's just like C malloc), but I've asked for opposite.
More information about the Digitalmars-d-learn
mailing list