changeset 12237:335b388c4b28

8024651: Remove the incorrect usage of Metablock::overhead() Reviewed-by: brutisso, mgerdin, coleenp, jmasa
author stefank
date Fri, 13 Sep 2013 22:21:06 +0200
parents c4c768305a8f
children 9e11762cee52
files src/share/vm/memory/metablock.cpp src/share/vm/memory/metablock.hpp src/share/vm/memory/metaspace.cpp
diffstat 3 files changed, 1 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/metablock.cpp	Thu Sep 12 10:15:54 2013 +0200
+++ b/src/share/vm/memory/metablock.cpp	Fri Sep 13 22:21:06 2013 +0200
@@ -50,13 +50,6 @@
 // Chunks, change Chunks so that they can be allocated out of a VirtualSpace.
 size_t Metablock::_min_block_byte_size = sizeof(Metablock);
 
-#ifdef ASSERT
-size_t Metablock::_overhead =
-  Chunk::aligned_overhead_size(sizeof(Metablock)) / BytesPerWord;
-#else
-size_t Metablock::_overhead = 0;
-#endif
-
 // New blocks returned by the Metaspace are zero initialized.
 // We should fix the constructors to not assume this instead.
 Metablock* Metablock::initialize(MetaWord* p, size_t word_size) {
--- a/src/share/vm/memory/metablock.hpp	Thu Sep 12 10:15:54 2013 +0200
+++ b/src/share/vm/memory/metablock.hpp	Fri Sep 13 22:21:06 2013 +0200
@@ -48,7 +48,6 @@
     } _header;
   } _block;
   static size_t _min_block_byte_size;
-  static size_t _overhead;
 
   typedef union block_t Block;
   typedef struct header_t Header;
@@ -73,7 +72,6 @@
   void set_prev(Metablock* v) { _block._header._prev = v; }
 
   static size_t min_block_byte_size() { return _min_block_byte_size; }
-  static size_t overhead() { return _overhead; }
 
   bool is_free()                 { return header()->_word_size != 0; }
   void clear_next()              { set_next(NULL); }
--- a/src/share/vm/memory/metaspace.cpp	Thu Sep 12 10:15:54 2013 +0200
+++ b/src/share/vm/memory/metaspace.cpp	Fri Sep 13 22:21:06 2013 +0200
@@ -737,9 +737,7 @@
     // MinChunkSize is a placeholder for the real minimum size JJJ
     size_t byte_size = word_size * BytesPerWord;
 
-    size_t byte_size_with_overhead = byte_size + Metablock::overhead();
-
-    size_t raw_bytes_size = MAX2(byte_size_with_overhead,
+    size_t raw_bytes_size = MAX2(byte_size,
                                  Metablock::min_block_byte_size());
     raw_bytes_size = ARENA_ALIGN(raw_bytes_size);
     size_t raw_word_size = raw_bytes_size / BytesPerWord;