mem-limits.h 1.31 KB
Newer Older
Jim Blandy's avatar
Jim Blandy committed
1
/* Includes for memory limit warnings.
2
   Copyright (C) 1990, 1993-1996, 2001-2011  Free Software Foundation, Inc.
Jim Blandy's avatar
Jim Blandy committed
3 4 5

This file is part of GNU Emacs.

6
GNU Emacs is free software: you can redistribute it and/or modify
Jim Blandy's avatar
Jim Blandy committed
7
it under the terms of the GNU General Public License as published by
8 9
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Jim Blandy's avatar
Jim Blandy committed
10 11 12 13 14 15 16

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
17
along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
Jim Blandy's avatar
Jim Blandy committed
18

19 20
#ifdef MSDOS
#include <dpmi.h>
Eli Zaretskii's avatar
Eli Zaretskii committed
21
extern int etext;
22 23
#endif

24 25 26
/* Some systems need this before <sys/resource.h>.  */
#include <sys/types.h>

27 28 29 30 31 32 33
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/time.h>
# include <sys/resource.h>
#else
# if HAVE_SYS_VLIMIT_H
#  include <sys/vlimit.h>	/* Obsolete, says glibc */
# endif
Jim Blandy's avatar
Jim Blandy committed
34 35
#endif

36
extern char *start_of_data (void);
37 38 39
#if defined USE_LSB_TAG
#define EXCEEDS_LISP_PTR(ptr) 0
#elif defined DATA_SEG_BITS
40
#define EXCEEDS_LISP_PTR(ptr) \
41
  (((uintptr_t) (ptr) & ~DATA_SEG_BITS) >> VALBITS)
42
#else
43
#define EXCEEDS_LISP_PTR(ptr) ((uintptr_t) (ptr) >> VALBITS)
44
#endif