harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x..@apache.org
Subject svn commit: r603433 - /harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.cpp
Date Wed, 12 Dec 2007 01:07:41 GMT
Author: xli
Date: Tue Dec 11 17:07:40 2007
New Revision: 603433

URL: http://svn.apache.org/viewvc?rev=603433&view=rev
Log:
reverted: HARMONY-5283 : [drlvm][gc] OOME causes error in VM code

Modified:
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.cpp?rev=603433&r1=603432&r2=603433&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/space_tuner.cpp Tue Dec 11 17:07:40
2007
@@ -206,12 +206,14 @@
   
   //POINTER_SIZE_INT additional_non_los_size = ((collector_num * 2) << GC_BLOCK_SHIFT_COUNT)
+ (non_los_live_obj_size >> GC_BLOCK_SHIFT_COUNT) * (GC_OBJ_SIZE_THRESHOLD/4);
   double additional_non_los_size = 0;
-  for(unsigned int i = 0; i < NORMAL_SIZE_SEGMENT_NUM; i++;){
+  for(unsigned int i = NORMAL_SIZE_SEGMENT_NUM; i--;){
     additional_non_los_size += (double)segment_live_size[i] * SEGMENT_INDEX_TO_SIZE(i) /
non_los_live_obj_size;
   }
   additional_non_los_size *= 1.2; // in case of some cases worse than average one
   POINTER_SIZE_INT non_los_live_block = non_los_live_obj_size / (GC_BLOCK_BODY_SIZE_BYTES-(POINTER_SIZE_INT)additional_non_los_size);
-  non_los_live_obj_size = (non_los_live_block << GC_BLOCK_SHIFT_COUNT);
+  additional_non_los_size *= non_los_live_block + 1;
+  additional_non_los_size += collector_num << (GC_BLOCK_SHIFT_COUNT + 1);
+  non_los_live_obj_size = round_up_to_size(non_los_live_obj_size + (POINTER_SIZE_INT)additional_non_los_size,
GC_BLOCK_SIZE_BYTES);
   if(non_los_live_obj_size > non_los_size)
     non_los_live_obj_size = non_los_size;
 



Mime
View raw message