summaryrefslogtreecommitdiff
path: root/rts/posix
diff options
context:
space:
mode:
authorThomas M. DuBuisson <tommd@muse.dev>2021-09-12 09:27:10 -0700
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-17 09:40:09 -0400
commitaa6caab0c0895c896621b1f62cf4b0f1601f43bf (patch)
tree14bc36f7f91384214673f10550515cd65477f57c /rts/posix
parente7c2ff8887291c4568f07df68cca8ff7a9bc8fbf (diff)
downloadhaskell-aa6caab0c0895c896621b1f62cf4b0f1601f43bf.tar.gz
Update error message to suggest the user consider OOM over RTS bug.
Fix #17039
Diffstat (limited to 'rts/posix')
-rw-r--r--rts/posix/OSMem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c
index db388414d9..fff2f1e590 100644
--- a/rts/posix/OSMem.c
+++ b/rts/posix/OSMem.c
@@ -645,7 +645,9 @@ void osCommitMemory(void *at, W_ size)
{
void *r = my_mmap(at, size, MEM_COMMIT);
if (r == NULL) {
- barf("Unable to commit %" FMT_Word " bytes of memory", size);
+ errorBelch("Unable to commit %" FMT_Word " bytes of memory", size);
+ errorBelch("Exiting. The system might be out of memory.");
+ stg_exit(EXIT_FAILURE);
}
}