diff src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.hpp @ 20218:828056cf311f

8040792: G1: Memory usage calculation uses sizeof(this) instead of sizeof(classname) Summary: A few locations in the code use sizeof(this) which returns the size of the pointer instead of sizeof(classname) which returns the size of the sum of its members. This change fixes these errors and adds a few tests. Reviewed-by: mgerdin, brutisso
author tschatzl
date Mon, 21 Jul 2014 09:40:19 +0200
parents 82693fb204a5
children 2c6ef90f030a
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.hpp	Mon Jul 21 09:40:19 2014 +0200
+++ b/src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.hpp	Mon Jul 21 09:40:19 2014 +0200
@@ -147,7 +147,7 @@
   void initialize();
   void purge_chunks(size_t keep_ratio);
 
-  size_t static_mem_size();
+  static size_t static_mem_size();
   size_t fl_mem_size();
 
 #ifndef PRODUCT
@@ -186,7 +186,7 @@
 
   static void purge_chunks(size_t keep_ratio);
 
-  static size_t static_mem_size();
+  static size_t free_chunks_static_mem_size();
   static size_t free_chunks_mem_size();
 
   // Search for the code blob from the recently allocated ones to find duplicates more quickly, as this
@@ -207,6 +207,8 @@
   // Length in elements
   size_t length() const { return _length; }
 
+  // Static data memory size in bytes of this set.
+  static size_t static_mem_size();
   // Memory size in bytes taken by this set.
   size_t mem_size();