comparison src/gc.c @ 4115:6595286b4bed

[xemacs-hg @ 2007-08-14 18:58:13 by crestani] 2006-12-29 Nix <nix@esperi.org.uk> * gc.c (recompute_need_to_garbage_collect): Avoid numeric overflow in percentage calculation.
author crestani
date Tue, 14 Aug 2007 18:58:16 +0000
parents 896a34d28b71
children 9a633a00c3f2
comparison
equal deleted inserted replaced
4114:3a33c28ce351 4115:6595286b4bed
312 (consing_since_gc > gc_cons_incremental_threshold) : 312 (consing_since_gc > gc_cons_incremental_threshold) :
313 #endif /* NEW_GC */ 313 #endif /* NEW_GC */
314 (consing_since_gc > gc_cons_threshold 314 (consing_since_gc > gc_cons_threshold
315 && 315 &&
316 #if 0 /* #### implement this better */ 316 #if 0 /* #### implement this better */
317 (100 * consing_since_gc) / total_data_usage () >= 317 ((double)consing_since_gc) / total_data_usage()) >=
318 gc_cons_percentage 318 ((double)gc_cons_percentage / 100)
319 #else 319 #else
320 (!total_gc_usage_set || 320 (!total_gc_usage_set ||
321 (100 * consing_since_gc) / total_gc_usage >= 321 ((double)consing_since_gc / total_gc_usage) >=
322 gc_cons_percentage) 322 ((double)gc_cons_percentage / 100))
323 #endif 323 #endif
324 ); 324 );
325 recompute_funcall_allocation_flag (); 325 recompute_funcall_allocation_flag ();
326 } 326 }
327 327