diff -r 360ce06580b8 -r 3c786355ffb4 src/share/vm/code/codeCache.hpp --- a/src/share/vm/code/codeCache.hpp Fri Mar 22 13:35:31 2013 -0400 +++ b/src/share/vm/code/codeCache.hpp Sat Mar 23 06:22:07 2013 -0700 @@ -156,6 +156,11 @@ static address low_bound() { return (address) _heap->low_boundary(); } static address high_bound() { return (address) _heap->high_boundary(); } + static bool has_space(int size) { + // Always leave some room in the CodeCache for I2C/C2I adapters + return largest_free_block() > (CodeCacheMinimumFreeSpace + size); + } + // Profiling static address first_address(); // first address used for CodeBlobs static address last_address(); // last address used for CodeBlobs