/* Functions for memory limit warnings.
- Copyright (C) 1990, 1992, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1992, 2001-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef emacs
#include <config.h>
#include <setjmp.h>
#include "lisp.h"
-#endif
-
#include "mem-limits.h"
-#ifdef HAVE_GETRLIMIT
-#include <sys/resource.h>
-#endif
-
/*
Level number of warnings already issued.
0 -- no warnings issued.
3 -- 95% warning issued; keep warning frequently.
*/
enum warnlevel { not_warned, warned_75, warned_85, warned_95 };
-
static enum warnlevel warnlevel;
+typedef POINTER_TYPE *POINTER;
+
/* Function to call to issue a warning;
0 means don't issue them. */
static void (*warn_function) (const char *);
}
#else
-#if !defined (BSD4_2) && !defined (__osf__)
+#if !defined (BSD4_2) && !defined (CYGWIN)
#ifdef MSDOS
void
}
#endif /* not MSDOS */
-#else /* BSD4_2 */
+#else /* BSD4_2 || CYGWIN */
static void
get_lim_data (void)
check_memory_limits (void)
{
#ifdef REL_ALLOC
- extern POINTER (*real_morecore) ();
+ extern POINTER (*real_morecore) (long);
#endif
- extern POINTER (*__morecore) ();
+ extern POINTER (*__morecore) (long);
register POINTER cp;
unsigned long five_percent;
*
*/
-POINTER
+char *
start_of_data (void)
{
#ifdef BSD_SYSTEM
/* Force data limit to be recalculated on each run. */
lim_data = 0;
}
-
-/* arch-tag: eab04eda-1f69-447a-8d9f-95f0a3983ca5
- (do not change this comment) */