6819085: G1: use larger and/or user settable region size

Instead of the region size being hard-coded, allow the user to set it.

Reviewed-by: jmasa, johnc, apetrusenko
This commit is contained in:
Antonios Printezis 2009-07-30 16:22:58 -04:00
parent c6763b5bad
commit 243367ec16
11 changed files with 125 additions and 41 deletions

View file

@ -167,16 +167,11 @@ class G1CollectedHeap : public SharedHeap {
friend class G1MarkSweep;
private:
enum SomePrivateConstants {
VeryLargeInBytes = HeapRegion::GrainBytes/2,
VeryLargeInWords = VeryLargeInBytes/HeapWordSize,
MinHeapDeltaBytes = 10 * HeapRegion::GrainBytes, // FIXME
NumAPIs = HeapRegion::MaxAge
};
// The one and only G1CollectedHeap, so static functions can find it.
static G1CollectedHeap* _g1h;
static size_t _humongous_object_threshold_in_words;
// Storage for the G1 heap (excludes the permanent generation).
VirtualSpace _g1_storage;
MemRegion _g1_reserved;
@ -1021,7 +1016,7 @@ public:
// Returns "true" iff the given word_size is "very large".
static bool isHumongous(size_t word_size) {
return word_size >= VeryLargeInWords;
return word_size >= _humongous_object_threshold_in_words;
}
// Update mod union table with the set of dirty cards.