Skip to content

Commit

Permalink
Changed oom error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Mewes committed Feb 26, 2014
1 parent f520d1a commit e5b6321
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/errors.cc
Expand Up @@ -7,7 +7,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>

#include <typeinfo>

Expand All @@ -28,7 +28,9 @@ NOINLINE void set_errno(int new_errno) {
}

NORETURN void crash_oom() {
fprintf(stderr, "Out of memory.\n");
const char *message = "rethinkdb: Memory allocation failed. This usually means "
"that we have run out of RAM. Aborting.\n";
fwrite(message, 1, strlen(message), stderr);
abort();
}

Expand Down

0 comments on commit e5b6321

Please sign in to comment.