Getting core.exception.OutOfMemoryError error on allocating large arrays
John Colvin
john.loughran.colvin at gmail.com
Sun Aug 18 05:33:13 PDT 2013
On Sunday, 18 August 2013 at 12:07:02 UTC, zorran wrote:
> on my machine (core i7, 16 gb ram, win7/64)
> next code written core.exception.OutOfMemoryError:
> enum long size= 1300_000_000;
> auto arr = new byte[size];
>
> but next code work fine:
> enum long size= 1300_000_000;
> byte * p = cast(byte *) malloc(size);
>
> i compiled in 64 bit mode
> i use keys: "dmc -c -m64 test.d"
Interesting... What happens if you use core.memory.GC.malloc?
More information about the Digitalmars-d-learn
mailing list