summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-14 17:12:47 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-14 17:12:47 +0000
commitad723e6f2489bc04e45d7f22b778d7c37b0160c3 (patch)
tree914e08b7fc372ac9cb50993e0253cbad17587124 /gc.c
parent17c33199584fefba4b244f00bbbfc280ec5a65b9 (diff)
* st.c (malloc): use xmalloc/xcalloc instead of plain
malloc/calloc, to detect memory allocation failure. see <http://www.nongnu.org/failmalloc/>. * gc.c (rb_memerror): should not raise empty nomem_error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index c73da2c..04f28e6 100644
--- a/gc.c
+++ b/gc.c
@@ -95,7 +95,7 @@ rb_memerror()
{
static int recurse = 0;
- if (recurse > 0 && rb_safe_level() < 4) {
+ if (!nomem_error || (recurse > 0 && rb_safe_level() < 4)) {
fprintf(stderr, "[FATAL] failed to allocate memory\n");
exit(1);
}