Mercurial > emacs
comparison src/alloc.c @ 39633:a0bf0cb8ff3e
(inhibit_garbage_collection): Simplify.
(Fmemory_use_counts): Ditto.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sat, 06 Oct 2001 23:32:01 +0000 |
parents | 715a67381594 |
children | 5f60884970a8 |
comparison
equal
deleted
inserted
replaced
39632:8cd74f2aa6e2 | 39633:a0bf0cb8ff3e |
---|---|
4010 | 4010 |
4011 int | 4011 int |
4012 inhibit_garbage_collection () | 4012 inhibit_garbage_collection () |
4013 { | 4013 { |
4014 int count = specpdl_ptr - specpdl; | 4014 int count = specpdl_ptr - specpdl; |
4015 Lisp_Object number; | 4015 specbind (Qgc_cons_threshold, make_number (MOST_POSITIVE_FIXNUM)); |
4016 int nbits = min (VALBITS, BITS_PER_INT); | |
4017 | |
4018 XSETINT (number, ((EMACS_INT) 1 << (nbits - 1)) - 1); | |
4019 | |
4020 specbind (Qgc_cons_threshold, number); | |
4021 | |
4022 return count; | 4016 return count; |
4023 } | 4017 } |
4024 | 4018 |
4025 | 4019 |
4026 DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", | 4020 DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", |
5353 (but the contents of a buffer's text do not count here).") | 5347 (but the contents of a buffer's text do not count here).") |
5354 () | 5348 () |
5355 { | 5349 { |
5356 Lisp_Object consed[8]; | 5350 Lisp_Object consed[8]; |
5357 | 5351 |
5358 XSETINT (consed[0], | 5352 consed[0] = make_number (min (MOST_POSITIVE_FIXNUM, cons_cells_consed)); |
5359 cons_cells_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | 5353 consed[1] = make_number (min (MOST_POSITIVE_FIXNUM, floats_consed)); |
5360 XSETINT (consed[1], | 5354 consed[2] = make_number (min (MOST_POSITIVE_FIXNUM, vector_cells_consed)); |
5361 floats_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | 5355 consed[3] = make_number (min (MOST_POSITIVE_FIXNUM, symbols_consed)); |
5362 XSETINT (consed[2], | 5356 consed[4] = make_number (min (MOST_POSITIVE_FIXNUM, string_chars_consed)); |
5363 vector_cells_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | 5357 consed[5] = make_number (min (MOST_POSITIVE_FIXNUM, misc_objects_consed)); |
5364 XSETINT (consed[3], | 5358 consed[6] = make_number (min (MOST_POSITIVE_FIXNUM, intervals_consed)); |
5365 symbols_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | 5359 consed[7] = make_number (min (MOST_POSITIVE_FIXNUM, strings_consed)); |
5366 XSETINT (consed[4], | |
5367 string_chars_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | |
5368 XSETINT (consed[5], | |
5369 misc_objects_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | |
5370 XSETINT (consed[6], | |
5371 intervals_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | |
5372 XSETINT (consed[7], | |
5373 strings_consed & ~(((EMACS_INT) 1) << (VALBITS - 1))); | |
5374 | 5360 |
5375 return Flist (8, consed); | 5361 return Flist (8, consed); |
5376 } | 5362 } |
5377 | 5363 |
5378 int suppress_checking; | 5364 int suppress_checking; |