diff options
| author | Stefan Monnier | 2012-08-14 17:38:06 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-08-14 17:38:06 -0400 |
| commit | fecbd8ff09483df59e238d1c950b825e14d78f6c (patch) | |
| tree | 2b2880d14c10a3462702e10ed1323cd23fd66985 /src | |
| parent | 3b61d6c9784fafb0c42ce7655d0195db3b1596fe (diff) | |
| download | emacs-fecbd8ff09483df59e238d1c950b825e14d78f6c.tar.gz emacs-fecbd8ff09483df59e238d1c950b825e14d78f6c.zip | |
* src/alloc.c (Fgarbage_collect): Use plural form consistently.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/alloc.c | 97 |
2 files changed, 62 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d1a4006c1bf..26e1ac3d9c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * alloc.c (Fgarbage_collect): Use plural form consistently. | ||
| 4 | |||
| 1 | 2012-08-14 Eli Zaretskii <eliz@gnu.org> | 5 | 2012-08-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each | 7 | * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each |
diff --git a/src/alloc.c b/src/alloc.c index c93fcb564c7..1d484d4a322 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -228,7 +228,7 @@ static ptrdiff_t pure_bytes_used_before_overflow; | |||
| 228 | #define PURE_POINTER_P(P) \ | 228 | #define PURE_POINTER_P(P) \ |
| 229 | ((uintptr_t) (P) - (uintptr_t) purebeg <= pure_size) | 229 | ((uintptr_t) (P) - (uintptr_t) purebeg <= pure_size) |
| 230 | 230 | ||
| 231 | /* Index in pure at which next pure Lisp object will be allocated.. */ | 231 | /* Index in pure at which next pure Lisp object will be allocated.. */ |
| 232 | 232 | ||
| 233 | static ptrdiff_t pure_bytes_used_lisp; | 233 | static ptrdiff_t pure_bytes_used_lisp; |
| 234 | 234 | ||
| @@ -254,6 +254,14 @@ static char *stack_copy; | |||
| 254 | static ptrdiff_t stack_copy_size; | 254 | static ptrdiff_t stack_copy_size; |
| 255 | #endif | 255 | #endif |
| 256 | 256 | ||
| 257 | static Lisp_Object Qconses; | ||
| 258 | static Lisp_Object Qsymbols; | ||
| 259 | static Lisp_Object Qmiscs; | ||
| 260 | static Lisp_Object Qstrings; | ||
| 261 | static Lisp_Object Qvectors; | ||
| 262 | static Lisp_Object Qfloats; | ||
| 263 | static Lisp_Object Qintervals; | ||
| 264 | static Lisp_Object Qbuffers; | ||
| 257 | static Lisp_Object Qstring_bytes, Qvector_slots, Qheap; | 265 | static Lisp_Object Qstring_bytes, Qvector_slots, Qheap; |
| 258 | static Lisp_Object Qgc_cons_threshold; | 266 | static Lisp_Object Qgc_cons_threshold; |
| 259 | Lisp_Object Qchar_table_extra_slots; | 267 | Lisp_Object Qchar_table_extra_slots; |
| @@ -5386,9 +5394,9 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5386 | char stack_top_variable; | 5394 | char stack_top_variable; |
| 5387 | ptrdiff_t i; | 5395 | ptrdiff_t i; |
| 5388 | int message_p; | 5396 | int message_p; |
| 5389 | Lisp_Object total[11]; | ||
| 5390 | ptrdiff_t count = SPECPDL_INDEX (); | 5397 | ptrdiff_t count = SPECPDL_INDEX (); |
| 5391 | EMACS_TIME start; | 5398 | EMACS_TIME start; |
| 5399 | Lisp_Object retval = Qnil; | ||
| 5392 | 5400 | ||
| 5393 | if (abort_on_gc) | 5401 | if (abort_on_gc) |
| 5394 | abort (); | 5402 | abort (); |
| @@ -5607,59 +5615,62 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5607 | } | 5615 | } |
| 5608 | 5616 | ||
| 5609 | unbind_to (count, Qnil); | 5617 | unbind_to (count, Qnil); |
| 5618 | { | ||
| 5619 | Lisp_Object total[11]; | ||
| 5620 | int total_size = 10; | ||
| 5610 | 5621 | ||
| 5611 | total[0] = list4 (Qcons, make_number (sizeof (struct Lisp_Cons)), | 5622 | total[0] = list4 (Qconses, make_number (sizeof (struct Lisp_Cons)), |
| 5612 | bounded_number (total_conses), | 5623 | bounded_number (total_conses), |
| 5613 | bounded_number (total_free_conses)); | 5624 | bounded_number (total_free_conses)); |
| 5614 | 5625 | ||
| 5615 | total[1] = list4 (Qsymbol, make_number (sizeof (struct Lisp_Symbol)), | 5626 | total[1] = list4 (Qsymbols, make_number (sizeof (struct Lisp_Symbol)), |
| 5616 | bounded_number (total_symbols), | 5627 | bounded_number (total_symbols), |
| 5617 | bounded_number (total_free_symbols)); | 5628 | bounded_number (total_free_symbols)); |
| 5618 | 5629 | ||
| 5619 | total[2] = list4 (Qmisc, make_number (sizeof (union Lisp_Misc)), | 5630 | total[2] = list4 (Qmiscs, make_number (sizeof (union Lisp_Misc)), |
| 5620 | bounded_number (total_markers), | 5631 | bounded_number (total_markers), |
| 5621 | bounded_number (total_free_markers)); | 5632 | bounded_number (total_free_markers)); |
| 5622 | 5633 | ||
| 5623 | total[3] = list4 (Qstring, make_number (sizeof (struct Lisp_String)), | 5634 | total[3] = list4 (Qstrings, make_number (sizeof (struct Lisp_String)), |
| 5624 | bounded_number (total_strings), | 5635 | bounded_number (total_strings), |
| 5625 | bounded_number (total_free_strings)); | 5636 | bounded_number (total_free_strings)); |
| 5626 | 5637 | ||
| 5627 | total[4] = list3 (Qstring_bytes, make_number (1), | 5638 | total[4] = list3 (Qstring_bytes, make_number (1), |
| 5628 | bounded_number (total_string_bytes)); | 5639 | bounded_number (total_string_bytes)); |
| 5629 | 5640 | ||
| 5630 | total[5] = list3 (Qvector, make_number (sizeof (struct Lisp_Vector)), | 5641 | total[5] = list3 (Qvectors, make_number (sizeof (struct Lisp_Vector)), |
| 5631 | bounded_number (total_vectors)); | 5642 | bounded_number (total_vectors)); |
| 5632 | 5643 | ||
| 5633 | total[6] = list4 (Qvector_slots, make_number (word_size), | 5644 | total[6] = list4 (Qvector_slots, make_number (word_size), |
| 5634 | bounded_number (total_vector_slots), | 5645 | bounded_number (total_vector_slots), |
| 5635 | bounded_number (total_free_vector_slots)); | 5646 | bounded_number (total_free_vector_slots)); |
| 5636 | 5647 | ||
| 5637 | total[7] = list4 (Qfloat, make_number (sizeof (struct Lisp_Float)), | 5648 | total[7] = list4 (Qfloats, make_number (sizeof (struct Lisp_Float)), |
| 5638 | bounded_number (total_floats), | 5649 | bounded_number (total_floats), |
| 5639 | bounded_number (total_free_floats)); | 5650 | bounded_number (total_free_floats)); |
| 5640 | 5651 | ||
| 5641 | total[8] = list4 (Qinterval, make_number (sizeof (struct interval)), | 5652 | total[8] = list4 (Qintervals, make_number (sizeof (struct interval)), |
| 5642 | bounded_number (total_intervals), | 5653 | bounded_number (total_intervals), |
| 5643 | bounded_number (total_free_intervals)); | 5654 | bounded_number (total_free_intervals)); |
| 5644 | 5655 | ||
| 5645 | total[9] = list3 (Qbuffer, make_number (sizeof (struct buffer)), | 5656 | total[9] = list3 (Qbuffers, make_number (sizeof (struct buffer)), |
| 5646 | bounded_number (total_buffers)); | 5657 | bounded_number (total_buffers)); |
| 5647 | 5658 | ||
| 5648 | total[10] = list4 (Qheap, make_number (1024), | ||
| 5649 | #ifdef DOUG_LEA_MALLOC | 5659 | #ifdef DOUG_LEA_MALLOC |
| 5650 | bounded_number ((mallinfo ().uordblks + 1023) >> 10), | 5660 | total_size++; |
| 5651 | bounded_number ((mallinfo ().fordblks + 1023) >> 10) | 5661 | total[10] = list4 (Qheap, make_number (1024), |
| 5652 | #else | 5662 | bounded_number ((mallinfo ().uordblks + 1023) >> 10), |
| 5653 | Qnil, Qnil | 5663 | bounded_number ((mallinfo ().fordblks + 1023) >> 10)); |
| 5654 | #endif | 5664 | #endif |
| 5655 | ); | 5665 | retval = Flist (total_size, total); |
| 5666 | } | ||
| 5656 | 5667 | ||
| 5657 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES | 5668 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES |
| 5658 | { | 5669 | { |
| 5659 | /* Compute average percentage of zombies. */ | 5670 | /* Compute average percentage of zombies. */ |
| 5660 | double nlive = | 5671 | double nlive |
| 5661 | (total_conses + total_symbols + total_markers + total_strings | 5672 | = (total_conses + total_symbols + total_markers + total_strings |
| 5662 | + total_vectors + total_floats + total_intervals + total_buffers); | 5673 | + total_vectors + total_floats + total_intervals + total_buffers); |
| 5663 | 5674 | ||
| 5664 | avg_live = (avg_live * ngcs + nlive) / (ngcs + 1); | 5675 | avg_live = (avg_live * ngcs + nlive) / (ngcs + 1); |
| 5665 | max_live = max (nlive, max_live); | 5676 | max_live = max (nlive, max_live); |
| @@ -5686,7 +5697,7 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5686 | 5697 | ||
| 5687 | gcs_done++; | 5698 | gcs_done++; |
| 5688 | 5699 | ||
| 5689 | return Flist (sizeof total / sizeof *total, total); | 5700 | return retval; |
| 5690 | } | 5701 | } |
| 5691 | 5702 | ||
| 5692 | 5703 | ||
| @@ -6804,6 +6815,14 @@ do hash-consing of the objects allocated to pure space. */); | |||
| 6804 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); | 6815 | doc: /* Non-nil means Emacs cannot get much more Lisp memory. */); |
| 6805 | Vmemory_full = Qnil; | 6816 | Vmemory_full = Qnil; |
| 6806 | 6817 | ||
| 6818 | DEFSYM (Qconses, "conses"); | ||
| 6819 | DEFSYM (Qsymbols, "symbols"); | ||
| 6820 | DEFSYM (Qmiscs, "miscs"); | ||
| 6821 | DEFSYM (Qstrings, "strings"); | ||
| 6822 | DEFSYM (Qvectors, "vectors"); | ||
| 6823 | DEFSYM (Qfloats, "floats"); | ||
| 6824 | DEFSYM (Qintervals, "intervals"); | ||
| 6825 | DEFSYM (Qbuffers, "buffers"); | ||
| 6807 | DEFSYM (Qstring_bytes, "string-bytes"); | 6826 | DEFSYM (Qstring_bytes, "string-bytes"); |
| 6808 | DEFSYM (Qvector_slots, "vector-slots"); | 6827 | DEFSYM (Qvector_slots, "vector-slots"); |
| 6809 | DEFSYM (Qheap, "heap"); | 6828 | DEFSYM (Qheap, "heap"); |