Mercurial > hg > xemacs-beta
comparison src/alloc.c @ 261:405dd6d1825b r20-5b29
Import from CVS: tag r20-5b29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:23:51 +0200 |
parents | 084402c475ba |
children | 727739f917cb |
comparison
equal
deleted
inserted
replaced
260:052205f7dd5f | 261:405dd6d1825b |
---|---|
3032 /**********************************************************************/ | 3032 /**********************************************************************/ |
3033 | 3033 |
3034 struct gcpro *gcprolist; | 3034 struct gcpro *gcprolist; |
3035 | 3035 |
3036 /* 415 used Mly 29-Jun-93 */ | 3036 /* 415 used Mly 29-Jun-93 */ |
3037 /* 1327 used slb 28-Feb-98 */ | |
3037 #define NSTATICS 1500 | 3038 #define NSTATICS 1500 |
3038 /* Not "static" because of linker lossage on some systems */ | 3039 /* Not "static" because of linker lossage on some systems */ |
3039 Lisp_Object *staticvec[NSTATICS] | 3040 Lisp_Object *staticvec[NSTATICS] |
3040 /* Force it into data space! */ | 3041 /* Force it into data space! */ |
3041 = {0}; | 3042 = {0}; |
4315 garbage_collect_1 (void) | 4316 garbage_collect_1 (void) |
4316 { | 4317 { |
4317 char stack_top_variable; | 4318 char stack_top_variable; |
4318 extern char *stack_bottom; | 4319 extern char *stack_bottom; |
4319 int i; | 4320 int i; |
4320 struct frame *f = selected_frame (); | 4321 struct frame *f; |
4321 int speccount = specpdl_depth (); | 4322 int speccount = specpdl_depth (); |
4322 Lisp_Object pre_gc_cursor = Qnil; | 4323 Lisp_Object pre_gc_cursor = Qnil; |
4323 struct gcpro gcpro1; | 4324 struct gcpro gcpro1; |
4324 | 4325 |
4325 int cursor_changed = 0; | 4326 int cursor_changed = 0; |
4330 if (gc_currently_forbidden || in_display) | 4331 if (gc_currently_forbidden || in_display) |
4331 return; | 4332 return; |
4332 | 4333 |
4333 if (preparing_for_armageddon) | 4334 if (preparing_for_armageddon) |
4334 return; | 4335 return; |
4336 | |
4337 /* This function cannot be called inside GC so we move to after the */ | |
4338 /* above tests */ | |
4339 f = selected_frame (); | |
4335 | 4340 |
4336 GCPRO1 (pre_gc_cursor); | 4341 GCPRO1 (pre_gc_cursor); |
4337 | 4342 |
4338 /* Very important to prevent GC during any of the following | 4343 /* Very important to prevent GC during any of the following |
4339 stuff that might run Lisp code; otherwise, we'll likely | 4344 stuff that might run Lisp code; otherwise, we'll likely |
4944 all_lcrecords = 0; | 4949 all_lcrecords = 0; |
4945 ignore_malloc_warnings = 1; | 4950 ignore_malloc_warnings = 1; |
4946 #ifdef DOUG_LEA_MALLOC | 4951 #ifdef DOUG_LEA_MALLOC |
4947 mallopt (M_TRIM_THRESHOLD, 128*1024); /* trim threshold */ | 4952 mallopt (M_TRIM_THRESHOLD, 128*1024); /* trim threshold */ |
4948 mallopt (M_MMAP_THRESHOLD, 64*1024); /* mmap threshold */ | 4953 mallopt (M_MMAP_THRESHOLD, 64*1024); /* mmap threshold */ |
4949 /* mallopt (M_MMAP_MAX, 64); /* max. number of mmap'ed areas */ | 4954 #if 0 /* Moved to emacs.c */ |
4955 mallopt (M_MMAP_MAX, 64); /* max. number of mmap'ed areas */ | |
4956 #endif | |
4950 #endif | 4957 #endif |
4951 init_string_alloc (); | 4958 init_string_alloc (); |
4952 init_string_chars_alloc (); | 4959 init_string_chars_alloc (); |
4953 init_cons_alloc (); | 4960 init_cons_alloc (); |
4954 init_symbol_alloc (); | 4961 init_symbol_alloc (); |