comparison src/share/vm/code/codeCache.hpp @ 8864:3c786355ffb4

8009026: [parfait] Null pointer deference in hotspot/src/share/vm/code/nmethod.cpp Summary: add guarantee() to nmethod constructor and checks to ensure CodeCache has space before allocation Reviewed-by: kvn
author morris
date Sat, 23 Mar 2013 06:22:07 -0700
parents 9deda4d8e126
children ebb32c4589f3 a7fb14888912
comparison
equal deleted inserted replaced
8863:360ce06580b8 8864:3c786355ffb4
154 154
155 // The full limits of the codeCache 155 // The full limits of the codeCache
156 static address low_bound() { return (address) _heap->low_boundary(); } 156 static address low_bound() { return (address) _heap->low_boundary(); }
157 static address high_bound() { return (address) _heap->high_boundary(); } 157 static address high_bound() { return (address) _heap->high_boundary(); }
158 158
159 static bool has_space(int size) {
160 // Always leave some room in the CodeCache for I2C/C2I adapters
161 return largest_free_block() > (CodeCacheMinimumFreeSpace + size);
162 }
163
159 // Profiling 164 // Profiling
160 static address first_address(); // first address used for CodeBlobs 165 static address first_address(); // first address used for CodeBlobs
161 static address last_address(); // last address used for CodeBlobs 166 static address last_address(); // last address used for CodeBlobs
162 static size_t capacity() { return _heap->capacity(); } 167 static size_t capacity() { return _heap->capacity(); }
163 static size_t max_capacity() { return _heap->max_capacity(); } 168 static size_t max_capacity() { return _heap->max_capacity(); }