< prev index next >
src/share/vm/code/codeCache.cpp
Print this page
*** 363,373 ****
*/
CodeBlob* CodeCache::allocate(int size, int code_blob_type, bool strict) {
// Possibly wakes up the sweeper thread.
NMethodSweeper::notify(code_blob_type);
assert_locked_or_safepoint(CodeCache_lock);
! assert(size > 0, err_msg_res("Code cache allocation request must be > 0 but is %d", size));
if (size <= 0) {
return NULL;
}
CodeBlob* cb = NULL;
--- 363,373 ----
*/
CodeBlob* CodeCache::allocate(int size, int code_blob_type, bool strict) {
// Possibly wakes up the sweeper thread.
NMethodSweeper::notify(code_blob_type);
assert_locked_or_safepoint(CodeCache_lock);
! assert(size > 0, "Code cache allocation request must be > 0 but is %d", size);
if (size <= 0) {
return NULL;
}
CodeBlob* cb = NULL;
*** 815,825 ****
double unallocated_capacity = MAX2((double)heap->unallocated_capacity(), 1.0); // Avoid division by 0;
double max_capacity = (double)heap->max_capacity();
double result = max_capacity / unallocated_capacity;
assert (max_capacity >= unallocated_capacity, "Must be");
! assert (result >= 1.0, err_msg_res("reverse_free_ratio must be at least 1. It is %f", result));
return result;
}
size_t CodeCache::bytes_allocated_in_freelists() {
size_t allocated_bytes = 0;
--- 815,825 ----
double unallocated_capacity = MAX2((double)heap->unallocated_capacity(), 1.0); // Avoid division by 0;
double max_capacity = (double)heap->max_capacity();
double result = max_capacity / unallocated_capacity;
assert (max_capacity >= unallocated_capacity, "Must be");
! assert (result >= 1.0, "reverse_free_ratio must be at least 1. It is %f", result);
return result;
}
size_t CodeCache::bytes_allocated_in_freelists() {
size_t allocated_bytes = 0;
< prev index next >