src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

changeset 1377
2c79770d1f6e
parent 1376
8b46c4d82093
child 1428
54b3b351d6f9
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Sep 02 00:04:29 2009 -0700
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Jul 30 16:22:58 2009 -0400
     1.3 @@ -25,6 +25,8 @@
     1.4  #include "incls/_precompiled.incl"
     1.5  #include "incls/_g1CollectedHeap.cpp.incl"
     1.6  
     1.7 +size_t G1CollectedHeap::_humongous_object_threshold_in_words = 0;
     1.8 +
     1.9  // turn it on so that the contents of the young list (scan-only /
    1.10  // to-be-collected) are printed at "strategic" points before / during
    1.11  // / after the collection --- this is useful for debugging
    1.12 @@ -1394,6 +1396,9 @@
    1.13    if (_process_strong_tasks == NULL || !_process_strong_tasks->valid()) {
    1.14      vm_exit_during_initialization("Failed necessary allocation.");
    1.15    }
    1.16 +
    1.17 +  _humongous_object_threshold_in_words = HeapRegion::GrainWords / 2;
    1.18 +
    1.19    int n_queues = MAX2((int)ParallelGCThreads, 1);
    1.20    _task_queues = new RefToScanQueueSet(n_queues);
    1.21  
    1.22 @@ -1546,9 +1551,10 @@
    1.23    const size_t max_region_idx = ((size_t)1 << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;
    1.24    guarantee((max_regions() - 1) <= max_region_idx, "too many regions");
    1.25  
    1.26 -  const size_t cards_per_region = HeapRegion::GrainBytes >> CardTableModRefBS::card_shift;
    1.27    size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1;
    1.28 -  guarantee(cards_per_region < max_cards_per_region, "too many cards per region");
    1.29 +  guarantee(HeapRegion::CardsPerRegion > 0, "make sure it's initialized");
    1.30 +  guarantee((size_t) HeapRegion::CardsPerRegion < max_cards_per_region,
    1.31 +            "too many cards per region");
    1.32  
    1.33    _bot_shared = new G1BlockOffsetSharedArray(_reserved,
    1.34                                               heap_word_size(init_byte_size));

mercurial