Mercurial > emacs
comparison src/alloc.c @ 11679:1ced2d67d411
(gc_cons_threshold): Make this an EMACS_INT.
(gc_sweep): Make already_free an EMACS_INT.
(inhibit_garbage_collection): Use XSETINT, and do arithmetic in type EMACS_INT.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 04 May 1995 16:19:08 +0000 |
parents | f5385353aae3 |
children | 53ccd2d608ee |
comparison
equal
deleted
inserted
replaced
11678:c0e33cdebfab | 11679:1ced2d67d411 |
---|---|
67 | 67 |
68 /* Number of bytes of consing done since the last gc */ | 68 /* Number of bytes of consing done since the last gc */ |
69 int consing_since_gc; | 69 int consing_since_gc; |
70 | 70 |
71 /* Number of bytes of consing since gc before another gc should be done. */ | 71 /* Number of bytes of consing since gc before another gc should be done. */ |
72 int gc_cons_threshold; | 72 EMACS_INT gc_cons_threshold; |
73 | 73 |
74 /* Nonzero during gc */ | 74 /* Nonzero during gc */ |
75 int gc_in_progress; | 75 int gc_in_progress; |
76 | 76 |
77 #ifndef VIRT_ADDR_VARIES | 77 #ifndef VIRT_ADDR_VARIES |
1318 | 1318 |
1319 int | 1319 int |
1320 inhibit_garbage_collection () | 1320 inhibit_garbage_collection () |
1321 { | 1321 { |
1322 int count = specpdl_ptr - specpdl; | 1322 int count = specpdl_ptr - specpdl; |
1323 | 1323 Lisp_Object number; |
1324 specbind (Qgc_cons_threshold, make_number ((1 << (VALBITS - 1)) - 1)); | 1324 |
1325 XSETINT (number, ((EMACS_INT) 1 << (VALBITS - 1)) - 1); | |
1326 | |
1327 specbind (Qgc_cons_threshold, number); | |
1325 | 1328 |
1326 return count; | 1329 return count; |
1327 } | 1330 } |
1328 | 1331 |
1329 DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", | 1332 DEFUN ("garbage-collect", Fgarbage_collect, Sgarbage_collect, 0, 0, "", |
2044 marker_free_list = 0; | 2047 marker_free_list = 0; |
2045 | 2048 |
2046 for (mblk = marker_block; mblk; mblk = mblk->next) | 2049 for (mblk = marker_block; mblk; mblk = mblk->next) |
2047 { | 2050 { |
2048 register int i; | 2051 register int i; |
2049 int already_free = -1; | 2052 EMACS_INT already_free = -1; |
2050 | 2053 |
2051 for (i = 0; i < lim; i++) | 2054 for (i = 0; i < lim; i++) |
2052 { | 2055 { |
2053 Lisp_Object *markword; | 2056 Lisp_Object *markword; |
2054 switch (mblk->markers[i].u_marker.type) | 2057 switch (mblk->markers[i].u_marker.type) |