]> code.delx.au - gnu-emacs/blob - src/mem-limits.h
Convert consecutive FSF copyright years to ranges.
[gnu-emacs] / src / mem-limits.h
1 /* Includes for memory limit warnings.
2 Copyright (C) 1990, 1993-1996, 2001-2011 Free Software Foundation, Inc.
3
4 This file is part of GNU Emacs.
5
6 GNU Emacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 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/>. */
18
19 #ifdef MSDOS
20 #include <dpmi.h>
21 extern int etext;
22 #endif
23
24 /* Some systems need this before <sys/resource.h>. */
25 #include <sys/types.h>
26
27 #ifdef HAVE_SYS_RESOURCE_H
28 # include <sys/time.h>
29 # include <sys/resource.h>
30 #else
31 # if HAVE_SYS_VLIMIT_H
32 # include <sys/vlimit.h> /* Obsolete, says glibc */
33 # endif
34 #endif
35
36 typedef unsigned long SIZE;
37
38 extern char *start_of_data (void);
39 #if defined USE_LSB_TAG
40 #define EXCEEDS_LISP_PTR(ptr) 0
41 #elif defined DATA_SEG_BITS
42 #define EXCEEDS_LISP_PTR(ptr) \
43 (((EMACS_UINT) (ptr) & ~DATA_SEG_BITS) >> VALBITS)
44 #else
45 #define EXCEEDS_LISP_PTR(ptr) ((EMACS_UINT) (ptr) >> VALBITS)
46 #endif
47