mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 14:30:43 -08:00
Mps master: arenavm.c: (diagnostic variety only; integ from br/vmem) fix floating point exception when a collection condemns 0 bytes.
(The VMCompact diag was calculating the live percentage by dividing by condemned size. Don't do this if condemned is zero.) Copied from Perforce Change: 172778 ServerID: perforce.ravenbrook.com
This commit is contained in:
commit
b2c677bb5d
1 changed files with 5 additions and 2 deletions
|
|
@ -1676,8 +1676,11 @@ static void VMCompact(Arena arena, Trace trace)
|
|||
Size vmem2 = VMArenaReserved(arena);
|
||||
Size vmemD = vmem1 - vmem2;
|
||||
Size live = trace->forwardedSize + trace->preservedInPlaceSize;
|
||||
Size livePerc = live / (trace->condemned / 100);
|
||||
|
||||
Size livePerc = 0;
|
||||
|
||||
if(trace->condemned / 100 != 0)
|
||||
livePerc = live / (trace->condemned / 100);
|
||||
|
||||
/* VMCompact diag: emit for all client-requested collections, */
|
||||
/* plus any others where chunks were gained or lost during the */
|
||||
/* collection. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue