Mercurial > emacs
changeset 51908:cb3976b5e59f
(pure, staticvec): Initialize these arrays to nonzero, so that they're
not put into BSS by that optimization.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Mon, 14 Jul 2003 05:37:52 +0000 |
parents | 4073a8ee4fc0 |
children | 5a68bb6ced69 |
files | src/alloc.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alloc.c Mon Jul 14 02:51:08 2003 +0000 +++ b/src/alloc.c Mon Jul 14 05:37:52 2003 +0000 @@ -185,9 +185,10 @@ #ifndef HAVE_SHM -/* Force it into data space! */ - -EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {0,}; +/* Force it into data space! Initialize it to a nonzero value; + otherwise some compilers put it into BSS. */ + +EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,}; #define PUREBEG (char *) pure #else /* HAVE_SHM */ @@ -404,10 +405,11 @@ struct gcpro *gcprolist; -/* Addresses of staticpro'd variables. */ +/* Addresses of staticpro'd variables. Initialize it to a nonzero + value; otherwise some compilers put it into BSS. */ #define NSTATICS 1280 -Lisp_Object *staticvec[NSTATICS] = {0}; +Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag}; /* Index of next unused slot in staticvec. */