CVS update by crestani xemacs/src ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Tue Aug 14 14:58:19 EDT 2007
User: crestani
Date: 07/08/14 20:58:19
Modified: xemacs/src ChangeLog gc.c
Log:
2006-12-29 Nix <nix at esperi.org.uk>
* gc.c (recompute_need_to_garbage_collect): Avoid numeric
overflow in percentage calculation.
Revision Changes Path
1.1083 +5 -0 XEmacs/xemacs/src/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1082
retrieving revision 1.1083
diff -u -p -r1.1082 -r1.1083
--- ChangeLog 2007/08/08 20:52:52 1.1082
+++ ChangeLog 2007/08/14 18:58:13 1.1083
@@ -1,3 +1,8 @@
+2006-12-29 Nix <nix at esperi.org.uk>
+
+ * gc.c (recompute_need_to_garbage_collect): Avoid numeric
+ overflow in percentage calculation.
+
2007-08-04 Stephen J. Turnbull <stephen at xemacs.org>
* sunpro.c (Fut_log_text): Fix mismatched parentheses, reorganize.
1.7 +4 -4 XEmacs/xemacs/src/gc.c
Index: gc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- gc.c 2006/07/19 19:24:42 1.6
+++ gc.c 2007/08/14 18:58:16 1.7
@@ -314,12 +314,12 @@ recompute_need_to_garbage_collect (void)
(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 ();
More information about the XEmacs-CVS
mailing list