aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2003-07-14 05:37:52 +0000
committerPaul Eggert2003-07-14 05:37:52 +0000
commit379b98b161ca1a4ff9a6b392aa5367308885a18d (patch)
tree56d42f5591992910b5f43589f7dbc96b7f4c5bf8 /src
parent19bcad1f59a3c3c02b461bac438b7c07c589580d (diff)
downloademacs-379b98b161ca1a4ff9a6b392aa5367308885a18d.tar.gz
emacs-379b98b161ca1a4ff9a6b392aa5367308885a18d.zip
(pure, staticvec): Initialize these arrays to nonzero, so that they're
not put into BSS by that optimization.
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c
index cffd0408e24..18770929532 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -185,9 +185,10 @@ Lisp_Object Vmemory_full;
185 185
186#ifndef HAVE_SHM 186#ifndef HAVE_SHM
187 187
188/* Force it into data space! */ 188/* Force it into data space! Initialize it to a nonzero value;
189 otherwise some compilers put it into BSS. */
189 190
190EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {0,}; 191EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,};
191#define PUREBEG (char *) pure 192#define PUREBEG (char *) pure
192 193
193#else /* HAVE_SHM */ 194#else /* HAVE_SHM */
@@ -404,10 +405,11 @@ static void check_gcpros P_ ((void));
404 405
405struct gcpro *gcprolist; 406struct gcpro *gcprolist;
406 407
407/* Addresses of staticpro'd variables. */ 408/* Addresses of staticpro'd variables. Initialize it to a nonzero
409 value; otherwise some compilers put it into BSS. */
408 410
409#define NSTATICS 1280 411#define NSTATICS 1280
410Lisp_Object *staticvec[NSTATICS] = {0}; 412Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag};
411 413
412/* Index of next unused slot in staticvec. */ 414/* Index of next unused slot in staticvec. */
413 415