# HG changeset patch # User crestani # Date 1187117896 0 # Node ID 6595286b4bed80e179246582c2622a7b0d5c232b # Parent 3a33c28ce35179694c1145468129e24a6b1b1628 [xemacs-hg @ 2007-08-14 18:58:13 by crestani] 2006-12-29 Nix * gc.c (recompute_need_to_garbage_collect): Avoid numeric overflow in percentage calculation. diff -r 3a33c28ce351 -r 6595286b4bed src/ChangeLog --- a/src/ChangeLog Mon Aug 13 21:51:24 2007 +0000 +++ b/src/ChangeLog Tue Aug 14 18:58:16 2007 +0000 @@ -1,3 +1,8 @@ +2006-12-29 Nix + + * gc.c (recompute_need_to_garbage_collect): Avoid numeric + overflow in percentage calculation. + 2007-08-04 Stephen J. Turnbull * sunpro.c (Fut_log_text): Fix mismatched parentheses, reorganize. diff -r 3a33c28ce351 -r 6595286b4bed src/gc.c --- a/src/gc.c Mon Aug 13 21:51:24 2007 +0000 +++ b/src/gc.c Tue Aug 14 18:58:16 2007 +0000 @@ -314,12 +314,12 @@ (consing_since_gc > gc_cons_threshold && #if 0 /* #### implement this better */ - (100 * consing_since_gc) / total_data_usage () >= - gc_cons_percentage + ((double)consing_since_gc) / total_data_usage()) >= + ((double)gc_cons_percentage / 100) #else (!total_gc_usage_set || - (100 * consing_since_gc) / total_gc_usage >= - gc_cons_percentage) + ((double)consing_since_gc / total_gc_usage) >= + ((double)gc_cons_percentage / 100)) #endif ); recompute_funcall_allocation_flag ();