java-1.8.0-openjdk/java-1.8.0-openjdk-size_t.patch

334 lines
20 KiB
Diff
Raw Normal View History

diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2015-06-09 10:21:39.000000000 -0400
2015-01-09 23:52:29 +00:00
@@ -2659,7 +2659,7 @@ void CFLS_LAB::get_from_global_pool(size
2013-03-12 13:35:26 +00:00
if (ResizeOldPLAB && CMSOldPLABResizeQuicker) {
size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks);
n_blks += CMSOldPLABReactivityFactor*multiple*n_blks;
- n_blks = MIN2(n_blks, CMSOldPLABMax);
+ n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax);
}
assert(n_blks > 0, "Error");
_cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
diff -up jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2015-06-09 10:21:39.000000000 -0400
2015-03-27 13:34:42 +00:00
@@ -957,7 +957,7 @@ void ConcurrentMarkSweepGeneration::comp
2013-05-03 15:30:33 +00:00
if (free_percentage < desired_free_percentage) {
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
assert(desired_capacity >= capacity(), "invalid expansion size");
- size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
+ size_t expand_bytes = MAX2(desired_capacity - capacity(), (size_t)MinHeapDeltaBytes);
if (PrintGCDetails && Verbose) {
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
gclog_or_tty->print_cr("\nFrom compute_new_size: ");
2015-03-27 13:34:42 +00:00
@@ -6575,7 +6575,7 @@ void CMSCollector::reset(bool asynch) {
2013-05-03 15:30:33 +00:00
HeapWord* curAddr = _markBitMap.startWord();
while (curAddr < _markBitMap.endWord()) {
size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr);
- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
+ MemRegion chunk(curAddr, MIN2((size_t)CMSBitMapYieldQuantum, remaining));
_markBitMap.clear_large_range(chunk);
if (ConcurrentMarkSweepThread::should_yield() &&
!foregroundGCIsActive() &&
@@ -6873,7 +6873,7 @@ void CMSMarkStack::expand() {
2013-05-03 15:30:33 +00:00
return;
}
// Double capacity if possible
- size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
+ size_t new_capacity = MIN2(_capacity*2, (size_t)MarkStackSizeMax);
// Do not give up existing stack until we have managed to
// get the double capacity that we desired.
ReservedSpace rs(ReservedSpace::allocation_align_size_up(
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp 2015-06-09 10:21:39.000000000 -0400
2015-03-27 13:34:42 +00:00
@@ -3902,7 +3902,7 @@ void CMTask::drain_local_queue(bool part
2013-03-12 13:35:26 +00:00
// of things to do) or totally (at the very end).
size_t target_size;
if (partially) {
- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
+ target_size = MIN2((size_t)(_task_queue->max_elems()/3), (size_t) GCDrainStackTargetSize);
} else {
target_size = 0;
}
2015-03-27 13:34:42 +00:00
@@ -4728,7 +4728,7 @@ size_t G1PrintRegionLivenessInfoClosure:
2013-03-12 13:35:26 +00:00
// The > 0 check is to deal with the prev and next live bytes which
// could be 0.
if (*hum_bytes > 0) {
- bytes = MIN2(HeapRegion::GrainBytes, *hum_bytes);
+ bytes = MIN2(HeapRegion::GrainBytes, (size_t)*hum_bytes);
*hum_bytes -= bytes;
}
return bytes;
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-06-09 10:21:39.000000000 -0400
@@ -1726,7 +1726,7 @@ HeapWord* G1CollectedHeap::expand_and_al
2013-03-12 13:35:26 +00:00
verify_region_sets_optional();
- size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
+ size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes);
ergo_verbose1(ErgoHeapSizing,
"attempt heap expansion",
ergo_format_reason("allocation request failed")
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp 2015-06-09 10:21:39.000000000 -0400
2015-01-09 23:52:29 +00:00
@@ -38,7 +38,7 @@ G1StringDedupQueue::G1StringDedupQueue()
_cancel(false),
_empty(true),
_dropped(0) {
- _nqueues = MAX2(ParallelGCThreads, (size_t)1);
+ _nqueues = MAX2(ParallelGCThreads, (uintx)1);
_queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
for (size_t i = 0; i < _nqueues; i++) {
new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1StringDedupTable.cpp 2015-06-09 10:21:39.000000000 -0400
2015-01-09 23:52:29 +00:00
@@ -110,7 +110,7 @@ public:
};
G1StringDedupEntryCache::G1StringDedupEntryCache() {
- _nlists = MAX2(ParallelGCThreads, (size_t)1);
+ _nlists = MAX2(ParallelGCThreads, (uintx)1);
_lists = PaddedArray<G1StringDedupEntryFreeList, mtGC>::create_unfreeable((uint)_nlists);
}
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp 2015-06-09 10:21:39.000000000 -0400
@@ -109,7 +109,7 @@ void HeapRegion::setup_heap_region_size(
2014-05-21 13:40:27 +00:00
if (FLAG_IS_DEFAULT(G1HeapRegionSize)) {
size_t average_heap_size = (initial_heap_size + max_heap_size) / 2;
2015-01-09 23:52:29 +00:00
region_size = MAX2(average_heap_size / HeapRegionBounds::target_number(),
- (uintx) HeapRegionBounds::min_size());
+ HeapRegionBounds::min_size());
2014-05-21 13:40:27 +00:00
}
int region_size_log = log2_long((jlong) region_size);
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp 2015-06-09 10:21:39.000000000 -0400
2015-01-09 23:52:29 +00:00
@@ -833,7 +833,7 @@ OtherRegionsTable::do_cleanup_work(HRRSC
2013-03-12 13:35:26 +00:00
// This can be done by either mutator threads together with the
// concurrent refinement threads or GC threads.
uint HeapRegionRemSet::num_par_rem_sets() {
- return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), (uint)ParallelGCThreads);
2015-01-09 23:52:29 +00:00
+ return MAX2(DirtyCardQueueSet::num_par_ids() + ConcurrentG1Refine::thread_num(), ParallelGCThreads);
2013-03-12 13:35:26 +00:00
}
HeapRegionRemSet::HeapRegionRemSet(G1BlockOffsetSharedArray* bosa,
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2015-06-09 10:21:39.000000000 -0400
@@ -194,7 +194,7 @@ bool ParScanThreadState::take_from_overf
const size_t num_overflow_elems = of_stack->size();
const size_t space_available = queue->max_elems() - queue->size();
const size_t num_take_elems = MIN3(space_available / 4,
- ParGCDesiredObjsFromOverflowList,
+ (size_t)ParGCDesiredObjsFromOverflowList,
num_overflow_elems);
// Transfer the most recent num_take_elems from the overflow
// stack to our work queue.
diff -up jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp 2015-06-09 10:21:39.000000000 -0400
2015-01-09 23:52:29 +00:00
@@ -910,8 +910,8 @@ void PSParallelCompact::initialize_space
2013-05-03 15:30:33 +00:00
void PSParallelCompact::initialize_dead_wood_limiter()
{
const size_t max = 100;
- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
+ _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
+ _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
_dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
DEBUG_ONLY(_dwl_initialized = true;)
_dwl_adjustment = normal_distribution(1.0);
diff -up jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp
--- jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/memory/collectorPolicy.cpp 2015-06-09 10:21:39.000000000 -0400
2015-03-27 13:34:42 +00:00
@@ -385,7 +385,7 @@ void TwoGenerationCollectorPolicy::initi
2014-05-21 13:40:27 +00:00
uintx calculated_size = NewSize + OldSize;
double shrink_factor = (double) MaxHeapSize / calculated_size;
uintx smaller_new_size = align_size_down((uintx)(NewSize * shrink_factor), _gen_alignment);
- FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), smaller_new_size));
+ FLAG_SET_ERGO(uintx, NewSize, MAX2(young_gen_size_lower_bound(), (size_t)smaller_new_size));
_initial_gen0_size = NewSize;
// OldSize is already aligned because above we aligned MaxHeapSize to
2015-03-27 13:34:42 +00:00
@@ -433,7 +433,7 @@ void GenCollectorPolicy::initialize_size
2013-05-03 15:30:33 +00:00
// yield a size that is too small) and bound it by MaxNewSize above.
// Ergonomics plays here by previously calculating the desired
// NewSize and MaxNewSize.
- max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
+ max_new_size = MIN2(MAX2(max_new_size, (size_t)NewSize), (size_t)MaxNewSize);
}
assert(max_new_size > 0, "All paths should set max_new_size");
2015-03-27 13:34:42 +00:00
@@ -455,24 +455,23 @@ void GenCollectorPolicy::initialize_size
// lower limit.
2013-03-12 13:35:26 +00:00
_min_gen0_size = NewSize;
desired_new_size = NewSize;
- max_new_size = MAX2(max_new_size, NewSize);
+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
} else if (FLAG_IS_ERGO(NewSize)) {
// If NewSize is set ergonomically, we should use it as a lower
// limit, but use NewRatio to calculate the initial size.
2015-01-09 23:52:29 +00:00
_min_gen0_size = NewSize;
desired_new_size =
- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
- max_new_size = MAX2(max_new_size, NewSize);
+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize);
+ max_new_size = MAX2(max_new_size, (size_t)NewSize);
} else {
// For the case where NewSize is the default, use NewRatio
// to size the minimum and initial generation sizes.
2014-05-21 13:40:27 +00:00
// Use the default NewSize as the floor for these values. If
2013-03-12 13:35:26 +00:00
// NewRatio is overly large, the resulting sizes can be too
// small.
2014-05-21 13:40:27 +00:00
- _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), NewSize);
+ _min_gen0_size = MAX2(scale_by_NewRatio_aligned(_min_heap_byte_size), (size_t)NewSize);
2013-03-12 13:35:26 +00:00
desired_new_size =
2014-05-21 13:40:27 +00:00
- MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize);
- }
+ MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize); }
2013-03-12 13:35:26 +00:00
assert(_min_gen0_size > 0, "Sanity check");
_initial_gen0_size = desired_new_size;
2015-03-27 13:34:42 +00:00
@@ -573,7 +572,7 @@ void TwoGenerationCollectorPolicy::initi
2013-03-12 13:35:26 +00:00
} else {
2014-05-21 13:40:27 +00:00
// It's been explicitly set on the command line. Use the
// OldSize and then determine the consequences.
- _min_gen1_size = MIN2(OldSize, _min_heap_byte_size - _min_gen0_size);
+ _min_gen1_size = MIN2((size_t)OldSize, _min_heap_byte_size - _min_gen0_size);
_initial_gen1_size = OldSize;
// If the user has explicitly set an OldSize that is inconsistent
diff -up jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t jdk8/hotspot/src/share/vm/memory/metaspace.cpp
--- jdk8/hotspot/src/share/vm/memory/metaspace.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/memory/metaspace.cpp 2015-06-09 10:21:39.000000000 -0400
2015-01-09 23:52:29 +00:00
@@ -1455,7 +1455,7 @@ void MetaspaceGC::initialize() {
void MetaspaceGC::post_initialize() {
// Reset the high-water mark once the VM initialization is done.
- _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
+ _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
}
bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
@@ -1515,7 +1515,7 @@ void MetaspaceGC::compute_new_size() {
2013-05-03 15:30:33 +00:00
(size_t)MIN2(min_tmp, double(max_uintx));
// Don't shrink less than the initial generation size
minimum_desired_capacity = MAX2(minimum_desired_capacity,
- MetaspaceSize);
+ (size_t)MetaspaceSize);
if (PrintGCDetails && Verbose) {
2014-05-21 13:40:27 +00:00
gclog_or_tty->print_cr("\nMetaspaceGC::compute_new_size: ");
2015-01-09 23:52:29 +00:00
@@ -1573,7 +1573,7 @@ void MetaspaceGC::compute_new_size() {
2013-05-03 15:30:33 +00:00
const double max_tmp = used_after_gc / minimum_used_percentage;
size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
maximum_desired_capacity = MAX2(maximum_desired_capacity,
- MetaspaceSize);
+ (size_t)MetaspaceSize);
2014-05-21 13:40:27 +00:00
if (PrintGCDetails && Verbose) {
2013-05-03 15:30:33 +00:00
gclog_or_tty->print_cr(" "
" maximum_free_percentage: %6.2f"
2015-03-27 13:34:42 +00:00
@@ -3245,7 +3245,7 @@ void Metaspace::global_initialize() {
2013-05-03 15:30:33 +00:00
// on the medium chunk list. The next chunk will be small and progress
// from there. This size calculated by -version.
_first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
2014-05-21 13:40:27 +00:00
- (CompressedClassSpaceSize/BytesPerWord)*2);
+ (size_t)(CompressedClassSpaceSize/BytesPerWord)*2);
2013-05-03 15:30:33 +00:00
_first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
// Arbitrarily set the initial virtual space to a multiple
// of the boot class loader size.
diff -up jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
--- jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp 2015-06-09 10:21:39.000000000 -0400
2015-03-27 13:34:42 +00:00
@@ -238,13 +238,13 @@ size_t ThreadLocalAllocBuffer::initial_d
size_t init_sz = 0;
2013-05-03 15:30:33 +00:00
if (TLABSize > 0) {
2015-03-27 13:34:42 +00:00
- init_sz = TLABSize / HeapWordSize;
+ init_sz = (size_t)(TLABSize / HeapWordSize);
} else if (global_stats() != NULL) {
// Initial size is a function of the average number of allocating threads.
unsigned nof_threads = global_stats()->allocating_threads_avg();
- init_sz = (Universe::heap()->tlab_capacity(myThread()) / HeapWordSize) /
- (nof_threads * target_refills());
+ init_sz = (size_t)((Universe::heap()->tlab_capacity(myThread()) / HeapWordSize) /
+ (nof_threads * target_refills()));
init_sz = align_object_size(init_sz);
}
init_sz = MIN2(MAX2(init_sz, min_size()), max_size());
diff -up jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
--- jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp 2015-06-09 10:21:39.000000000 -0400
@@ -48,7 +48,7 @@ void ObjArrayKlass::objarray_follow_cont
2013-03-12 13:35:26 +00:00
const size_t beg_index = size_t(index);
assert(beg_index < len || len == 0, "index too large");
- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
const size_t end_index = beg_index + stride;
T* const base = (T*)a->base();
T* const beg = base + beg_index;
@@ -82,7 +82,7 @@ void ObjArrayKlass::objarray_follow_cont
2013-03-12 13:35:26 +00:00
const size_t beg_index = size_t(index);
assert(beg_index < len || len == 0, "index too large");
- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
const size_t end_index = beg_index + stride;
T* const base = (T*)a->base();
T* const beg = base + beg_index;
diff -up jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t jdk8/hotspot/src/share/vm/runtime/arguments.cpp
--- jdk8/hotspot/src/share/vm/runtime/arguments.cpp.size_t 2015-05-19 12:16:26.000000000 -0400
+++ jdk8/hotspot/src/share/vm/runtime/arguments.cpp 2015-06-09 10:21:39.000000000 -0400
2015-03-27 13:34:42 +00:00
@@ -1277,7 +1277,7 @@ void Arguments::set_cms_and_parnew_gc_fl
2013-05-03 15:30:33 +00:00
// NewSize was set on the command line and it is larger than
// preferred_max_new_size.
if (!FLAG_IS_DEFAULT(NewSize)) { // NewSize explicitly set at command-line
- FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
+ FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t)NewSize, preferred_max_new_size));
} else {
FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
}
2015-03-27 13:34:42 +00:00
@@ -1302,8 +1302,8 @@ void Arguments::set_cms_and_parnew_gc_fl
2013-05-03 15:30:33 +00:00
// Unless explicitly requested otherwise, make young gen
// at least min_new, and at most preferred_max_new_size.
if (FLAG_IS_DEFAULT(NewSize)) {
- FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
- FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
+ FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t)NewSize, min_new));
+ FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t)NewSize));
if (PrintGCDetails && Verbose) {
// Too early to use gclog_or_tty
tty->print_cr("CMS ergo set NewSize: " SIZE_FORMAT, NewSize);
2015-03-27 13:34:42 +00:00
@@ -1313,7 +1313,7 @@ void Arguments::set_cms_and_parnew_gc_fl
2013-03-12 13:35:26 +00:00
// so it's NewRatio x of NewSize.
if (FLAG_IS_DEFAULT(OldSize)) {
if (max_heap > NewSize) {
- FLAG_SET_ERGO(uintx, OldSize, MIN2(NewRatio*NewSize, max_heap - NewSize));
+ FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t)(NewRatio*NewSize), max_heap - NewSize));
if (PrintGCDetails && Verbose) {
// Too early to use gclog_or_tty
tty->print_cr("CMS ergo set OldSize: " SIZE_FORMAT, OldSize);
diff -up jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp.size_t jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
--- jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp.size_t 2015-06-09 10:35:04.000000000 -0400
+++ jdk8/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp 2015-06-09 10:33:21.000000000 -0400
@@ -117,7 +117,7 @@ size_t G1PageBasedVirtualSpace::uncommit
return reserved_size() - committed_size();
}
-size_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
+uintptr_t G1PageBasedVirtualSpace::addr_to_page_index(char* addr) const {
return (addr - _low_boundary) / _page_size;
}