]> code.delx.au - gnu-emacs/blobdiff - src/vm-limit.c
* lisp.h (KEYMAPP): New macro.
[gnu-emacs] / src / vm-limit.c
index 12b38f7050fa21a79cef77c712bb39cd010b8b71..721e740bd02858e2d1b3a94d6c0a05568403f2f1 100644 (file)
@@ -15,10 +15,11 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
 #ifdef emacs
-#include "config.h"
+#include <config.h>
 #include "lisp.h"
 #endif
 
@@ -49,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;
@@ -60,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;
 
@@ -129,4 +139,9 @@ memory_warnings (start, warnfun)
 
   warn_function = warnfun;
   __after_morecore_hook = check_memory_limits;
+
+#ifdef WINDOWSNT
+  /* Force data limit to be recalculated on each run.  */
+  lim_data = 0;
+#endif
 }