I think this fixes #1209
Previously:
outofmem.exe: getMBlocks: VirtualAlloc MEM_RESERVE 1025 blocks failed: Not enoug
h storage is available to process this command.
Now:
outofmem.exe: out of memory
if(rec->base==0) {
stgFree((void*)rec);
rec=0;
if(rec->base==0) {
stgFree((void*)rec);
rec=0;
- sysErrorBelch(
- "getMBlocks: VirtualAlloc MEM_RESERVE %d blocks failed", n);
+ if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
+
+ errorBelch("out of memory");
+ } else {
+ sysErrorBelch(
+ "getMBlocks: VirtualAlloc MEM_RESERVE %d blocks failed", n);
+ }
} else {
alloc_rec temp;
temp.base=0; temp.size=0; temp.next=allocs;
} else {
alloc_rec temp;
temp.base=0; temp.size=0; temp.next=allocs;