8314588: gc/metaspace/TestMetaspaceInitialization.java failed "assert(capacity_until_gc >= committed_bytes) failed: capacity_until_gc: 3145728 < committed_bytes: 3211264"
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
5a97411f85
commit
b1228de623
@ -404,12 +404,11 @@ size_t MetaspaceGC::allowed_expansion() {
|
||||
size_t committed_bytes = MetaspaceUtils::committed_bytes();
|
||||
size_t capacity_until_gc = capacity_until_GC();
|
||||
|
||||
assert(capacity_until_gc >= committed_bytes,
|
||||
"capacity_until_gc: " SIZE_FORMAT " < committed_bytes: " SIZE_FORMAT,
|
||||
capacity_until_gc, committed_bytes);
|
||||
|
||||
size_t left_until_max = MaxMetaspaceSize - committed_bytes;
|
||||
size_t left_until_GC = capacity_until_gc - committed_bytes;
|
||||
// capacity_until_GC may have been decreased concurrently and may
|
||||
// temporarily be lower than what metaspace has committed. Allow for that.
|
||||
size_t left_until_GC = capacity_until_gc > committed_bytes ?
|
||||
capacity_until_gc - committed_bytes : 0;
|
||||
size_t left_to_commit = MIN2(left_until_GC, left_until_max);
|
||||
log_trace(gc, metaspace, freelist)("allowed expansion words: " SIZE_FORMAT
|
||||
" (left_until_max: " SIZE_FORMAT ", left_until_GC: " SIZE_FORMAT ".",
|
||||
|
Loading…
x
Reference in New Issue
Block a user