diff src/share/vm/memory/heap.cpp @ 2091:51bd2d261853

7008325: CodeCache exhausted on sparc starting from hs20b04 Summary: remove clear_scratch_buffer_blob and let init_scratch_buffer_blob free and allocate a new blob if required. Reviewed-by: twisti
author kvn
date Wed, 29 Dec 2010 10:41:43 -0800
parents f95d63e2154a
children 1c0cf339481b
line wrap: on
line diff
--- a/src/share/vm/memory/heap.cpp	Tue Dec 28 17:34:02 2010 -0800
+++ b/src/share/vm/memory/heap.cpp	Wed Dec 29 10:41:43 2010 -0800
@@ -315,6 +315,15 @@
   return l;
 }
 
+size_t CodeHeap::largest_free_block() const {
+  size_t len = 0;
+  for (FreeBlock* b = _freelist; b != NULL; b = b->link()) {
+    if (b->length() > len)
+      len = b->length();
+  }
+  return size(len);
+}
+
 // Free list management
 
 FreeBlock *CodeHeap::following_block(FreeBlock *b) {