Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / src / mem-limits.h
CommitLineData
9889c728 1/* Includes for memory limit warnings.
acaf905b 2 Copyright (C) 1990, 1993-1996, 2001-2012 Free Software Foundation, Inc.
9889c728
JB
3
4This file is part of GNU Emacs.
5
b9b1cc14 6GNU Emacs is free software: you can redistribute it and/or modify
9889c728 7it under the terms of the GNU General Public License as published by
b9b1cc14
GM
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
9889c728
JB
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
b9b1cc14 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
9889c728 18
004164c5
RS
19#ifdef MSDOS
20#include <dpmi.h>
a8c1733b 21extern int etext;
004164c5
RS
22#endif
23
f920c441
RM
24/* Some systems need this before <sys/resource.h>. */
25#include <sys/types.h>
26
0a7d6039
DL
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
c027d070
JB
34#endif
35
56a000c7 36extern char *start_of_data (void);
2fb0ce67
SM
37#if defined USE_LSB_TAG
38#define EXCEEDS_LISP_PTR(ptr) 0
39#elif defined DATA_SEG_BITS
27050994 40#define EXCEEDS_LISP_PTR(ptr) \
fdccd48e 41 (((uintptr_t) (ptr) & ~DATA_SEG_BITS) >> VALBITS)
27050994 42#else
fdccd48e 43#define EXCEEDS_LISP_PTR(ptr) ((uintptr_t) (ptr) >> VALBITS)
27050994 44#endif