diff src/share/vm/oops/constantPoolKlass.hpp @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents a61af66fc99e
children d1605aabd0a1
line wrap: on
line diff
--- a/src/share/vm/oops/constantPoolKlass.hpp	Fri Apr 11 09:56:35 2008 -0400
+++ b/src/share/vm/oops/constantPoolKlass.hpp	Sun Apr 13 17:43:42 2008 -0400
@@ -24,7 +24,8 @@
 
 // A constantPoolKlass is the klass of a constantPoolOop
 
-class constantPoolKlass : public arrayKlass {
+class constantPoolKlass : public Klass {
+  juint    _alloc_size;        // allocation profiling support
  public:
   // Dispatched klass operations
   bool oop_is_constantPool() const  { return true; }
@@ -44,7 +45,7 @@
 
   // Sizing
   static int header_size()        { return oopDesc::header_size() + sizeof(constantPoolKlass)/HeapWordSize; }
-  int object_size() const         { return arrayKlass::object_size(header_size()); }
+  int object_size() const        { return align_object_size(header_size()); }
 
   // Garbage collection
   void oop_follow_contents(oop obj);
@@ -57,6 +58,11 @@
   int oop_oop_iterate(oop obj, OopClosure* blk);
   int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr);
 
+  // Allocation profiling support
+  // no idea why this is pure virtual and not in Klass ???
+  juint alloc_size() const              { return _alloc_size; }
+  void set_alloc_size(juint n)          { _alloc_size = n; }
+
 #ifndef PRODUCT
  public:
   // Printing