comparison src/alloc.c @ 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 20d4eb1de9b0
comparison
equal deleted inserted replaced
51907:4073a8ee4fc0 51908:cb3976b5e59f
183 183
184 Lisp_Object Vmemory_full; 184 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 189 otherwise some compilers put it into BSS. */
190 EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {0,}; 190
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 */
194 195
195 #define pure PURE_SEG_BITS /* Use shared memory segment */ 196 #define pure PURE_SEG_BITS /* Use shared memory segment */
402 403
403 /* Recording what needs to be marked for gc. */ 404 /* Recording what needs to be marked for gc. */
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
414 int staticidx = 0; 416 int staticidx = 0;
415 417