From 0766f03ac720a0fb821e8ab091bc94670c83d523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Sun, 10 Sep 2000 21:45:19 +0200 Subject: [PATCH] Bugfix on the 16MB limit. Rev: src/pike_memory.c:1.87 --- src/pike_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pike_memory.c b/src/pike_memory.c index 3d9fc09120..9405c7e955 100644 --- a/src/pike_memory.c +++ b/src/pike_memory.c @@ -10,7 +10,7 @@ #include "pike_macros.h" #include "gc.h" -RCSID("$Id: pike_memory.c,v 1.86 2000/09/10 19:08:14 grubba Exp $"); +RCSID("$Id: pike_memory.c,v 1.87 2000/09/10 19:45:19 grubba Exp $"); /* strdup() is used by several modules, so let's provide it */ #ifndef HAVE_STRDUP @@ -1394,7 +1394,8 @@ void *debug_malloc(size_t s, LOCATION location) { char *m; - if (s & 0xff000000) { + /* Complain on attempts to allocate more than 16MB memory */ + if (s > (size_t)0x01000000) { fatal("malloc(0x%08lx) -- Huge malloc!\n", (unsigned long)s); } -- GitLab