/* maybe_gc collects garbage if this goes negative. */
-consing_ct consing_until_gc;
+intmax_t consing_until_gc;
#ifdef HAVE_PDUMPER
/* Number of finalizers run: used to loop over GC until we stop
might incorrectly return non-zero. */
int incr = sizeof *ptr;
if (INT_ADD_WRAPV (consing_until_gc, incr, &consing_until_gc))
- consing_until_gc = CONSING_CT_MAX;
+ consing_until_gc = INTMAX_MAX;
gcstat.total_free_conses++;
}
static void
allow_garbage_collection (intmax_t consing)
{
- consing_until_gc = consing - (CONSING_CT_MAX - consing_until_gc);
+ consing_until_gc = consing - (INTMAX_MAX - consing_until_gc);
garbage_collection_inhibited--;
}
ptrdiff_t count = SPECPDL_INDEX ();
record_unwind_protect_intmax (allow_garbage_collection, consing_until_gc);
garbage_collection_inhibited++;
- consing_until_gc = CONSING_CT_MAX;
+ consing_until_gc = INTMAX_MAX;
return count;
}
/* In case user calls debug_print during GC,
don't let that cause a recursive GC. */
- consing_until_gc = CONSING_CT_MAX;
+ consing_until_gc = INTMAX_MAX;
/* Save what's currently displayed in the echo area. Don't do that
if we are GC'ing because we've run out of memory, since
consing_until_gc = memory_full_cons_threshold;
else
{
- consing_ct threshold = max (gc_cons_threshold, GC_DEFAULT_THRESHOLD / 10);
+ intmax_t threshold = max (gc_cons_threshold, GC_DEFAULT_THRESHOLD / 10);
if (FLOATP (Vgc_cons_percentage))
{
double tot = (XFLOAT_DATA (Vgc_cons_percentage)
* total_bytes_of_live_objects ());
if (threshold < tot)
{
- if (tot < CONSING_CT_MAX)
+ if (tot < INTMAX_MAX)
threshold = tot;
else
- threshold = CONSING_CT_MAX;
+ threshold = INTMAX_MAX;
}
}
consing_until_gc = threshold;
extern void garbage_collect (void);
extern const char *pending_malloc_warning;
extern Lisp_Object zero_vector;
-#define CONSING_CT_MAX max (INTPTR_MAX, EMACS_INT_MAX)
-#if CONSING_CT_MAX == INTPTR_MAX
-typedef intptr_t consing_ct;
-#else
-typedef EMACS_INT consing_ct;
-#endif
-extern consing_ct consing_until_gc;
+extern intmax_t consing_until_gc;
#ifdef HAVE_PDUMPER
extern int number_finalizers_run;
#endif