Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
211a0b2a
Commit
211a0b2a
authored
Jun 08, 2011
by
Paul Eggert
Browse files
* alloc.c (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
parent
5a25e253
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/ChangeLog
src/ChangeLog
+1
-0
src/alloc.c
src/alloc.c
+5
-5
No files found.
src/ChangeLog
View file @
211a0b2a
...
...
@@ -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.
...
...
src/alloc.c
View file @
211a0b2a
...
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment