From 211a0b2a705753ca0d3f8040f177f0d788298bb6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 8 Jun 2011 12:01:08 -0700 Subject: [PATCH] * alloc.c (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'. --- src/ChangeLog | 1 + src/alloc.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 171d48cbe11..432cea6a624 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -13,6 +13,7 @@ (n_vectors, n_symbol_blocks, n_marker_blocks): Remove. These were 'int' variables that could overflow on 64-bit hosts; they were never used, so remove them instead of repairing them. + (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'. * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int. (allocate_vectorlike): Check for ptrdiff_t overflow. diff --git a/src/alloc.c b/src/alloc.c index 1a7d729b29a..dd2e5f4b6ad 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -3905,11 +3905,11 @@ static Lisp_Object zombies[MAX_ZOMBIES]; /* Number of zombie objects. */ -static int nzombies; +static EMACS_INT nzombies; /* Number of garbage collections. */ -static int ngcs; +static EMACS_INT ngcs; /* Average percentage of zombies per collection. */ @@ -3917,7 +3917,7 @@ static double avg_zombies; /* Max. number of live and zombie objects. */ -static int max_live, max_zombies; +static EMACS_INT max_live, max_zombies; /* Average number of live objects per GC. */ @@ -3928,7 +3928,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", (void) { Lisp_Object args[8], zombie_list = Qnil; - int i; + EMACS_INT i; for (i = 0; i < nzombies; i++) zombie_list = Fcons (zombies[i], zombie_list); args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d\nzombies: %S"); @@ -4255,7 +4255,7 @@ dump_zombies (void) { int i; - fprintf (stderr, "\nZombies kept alive = %d:\n", nzombies); + fprintf (stderr, "\nZombies kept alive = %"pI":\n", nzombies); for (i = 0; i < min (MAX_ZOMBIES, nzombies); ++i) { fprintf (stderr, " %d = ", i); -- 2.39.5