projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
put the @N suffix on stdcall foreign calls in .cmm code
[ghc-hetmet.git]
/
rts
/
sm
/
MBlock.c
diff --git
a/rts/sm/MBlock.c
b/rts/sm/MBlock.c
index
601387c
..
54d4148
100644
(file)
--- a/
rts/sm/MBlock.c
+++ b/
rts/sm/MBlock.c
@@
-348,8
+348,13
@@
allocNew(nat n) {
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;