changeset 30062:9a026d470bc9

(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.
author Andrew Innes <andrewi@gnu.org>
date Wed, 05 Jul 2000 16:32:37 +0000
parents 3de459e6c652
children f5bcbb9efca6
files src/vm-limit.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/vm-limit.c	Wed Jul 05 16:31:17 2000 +0000
+++ b/src/vm-limit.c	Wed Jul 05 16:32:37 2000 +0000
@@ -50,8 +50,12 @@
 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 @@
   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;