diff options
| author | Paul Eggert | 2003-07-14 05:37:52 +0000 |
|---|---|---|
| committer | Paul Eggert | 2003-07-14 05:37:52 +0000 |
| commit | 379b98b161ca1a4ff9a6b392aa5367308885a18d (patch) | |
| tree | 56d42f5591992910b5f43589f7dbc96b7f4c5bf8 /src/alloc.c | |
| parent | 19bcad1f59a3c3c02b461bac438b7c07c589580d (diff) | |
| download | emacs-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/alloc.c')
| -rw-r--r-- | src/alloc.c | 10 |
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 | ||
| 190 | EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {0,}; | 191 | EMACS_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 | ||
| 405 | struct gcpro *gcprolist; | 406 | struct 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 |
| 410 | Lisp_Object *staticvec[NSTATICS] = {0}; | 412 | Lisp_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 | ||