summaryrefslogtreecommitdiff
path: root/src/vm-limit.c
diff options
context:
space:
mode:
authorAndrew Innes <andrewi@gnu.org>2000-07-05 16:32:37 +0000
committerAndrew Innes <andrewi@gnu.org>2000-07-05 16:32:37 +0000
commit968e9c040adf26740fd77c9dedacf4a513595824 (patch)
tree928ee43cd62cfe7748551d30358b1e2cdafba2c8 /src/vm-limit.c
parent321ed47b16711ddcf3f2ee5d7a6b9395c33205d8 (diff)
downloademacs-968e9c040adf26740fd77c9dedacf4a513595824.tar.gz
(check_memory_limits) [REL_ALLOC]: Use real_morecore
when non-NULL instead of __morecore, to take account of buffer memory. This also solves a problem with spurious memory warnings on Windows.
Diffstat (limited to 'src/vm-limit.c')
-rw-r--r--src/vm-limit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vm-limit.c b/src/vm-limit.c
index eb43e836bae..721e740bd02 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -50,8 +50,12 @@ static void (*warn_function) ();
static void
check_memory_limits ()
{
+#ifdef REL_ALLOC
+ extern POINTER (*real_morecore) ();
+#endif
extern POINTER (*__morecore) ();
+
register POINTER cp;
unsigned long five_percent;
unsigned long data_size;
@@ -61,6 +65,11 @@ check_memory_limits ()
five_percent = lim_data / 20;
/* Find current end of memory and issue warning if getting near max */
+#ifdef REL_ALLOC
+ if (real_morecore)
+ cp = (char *) (*real_morecore) (0);
+ else
+#endif
cp = (char *) (*__morecore) (0);
data_size = (char *) cp - (char *) data_space_start;