Commit 968e9c04 authored by Andrew Innes's avatar Andrew Innes
Browse files

(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.
parent 321ed47b
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment