Getting core.exception.OutOfMemoryError error on allocating large arrays

zorran zorran at tut.by
Sun Aug 18 05:07:01 PDT 2013


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"


More information about the Digitalmars-d-learn mailing list