fix bugs
authorbdemsky <bdemsky>
Wed, 22 Sep 2010 02:29:13 +0000 (02:29 +0000)
committerbdemsky <bdemsky>
Wed, 22 Sep 2010 02:29:13 +0000 (02:29 +0000)
Robust/src/Runtime/bamboo/multicoregarbage.c

index 7b5dffe12f05580b3cae7e305bc27666b78a90cd..381083a365c76d08cd073c22fa597b6faae0d03f 100644 (file)
@@ -3020,6 +3020,7 @@ int cacheAdapt_policy_dominate(){
          continue;
        }
        totalfreq = (totalfreq*GC_CACHE_ADAPT_DOMINATE_THRESHOLD)/100/BAMBOO_PAGE_SIZE;
+       hotfreq/=BAMBOO_PAGE_SIZE;
        if(hotfreq < totalfreq) {
          // use hfh
          policy.cache_mode = BAMBOO_CACHE_MODE_HASH;
@@ -3130,6 +3131,7 @@ int cacheAdapt_policy_overload(){
        }
 
        totalfreq/=BAMBOO_PAGE_SIZE;
+       hotfreq/=BAMBOO_PAGE_SIZE;
        // locally cache the page in the hotest core
        // NOTE: (x,y) should be changed to (x+1, y+1)!!!
        policy.cache_mode = BAMBOO_CACHE_MODE_COORDS;
@@ -3240,6 +3242,7 @@ int cacheAdapt_policy_crowd(){
          continue;
        }
        totalfreq/=BAMBOO_PAGE_SIZE;
+       hotfreq/=BAMBOO_PAGE_SIZE;
        // locally cache the page in the hotest core
        // NOTE: (x,y) should be changed to (x+1, y+1)!!!
        policy.cache_mode = BAMBOO_CACHE_MODE_COORDS;