< prev index next >

src/share/vm/oops/arrayKlass.cpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/javaClasses.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "classfile/vmSymbols.hpp"
  29 #include "gc_interface/collectedHeap.inline.hpp"

  30 #include "jvmtifiles/jvmti.h"
  31 #include "memory/gcLocker.hpp"
  32 #include "memory/universe.inline.hpp"
  33 #include "oops/arrayKlass.hpp"
  34 #include "oops/arrayOop.hpp"
  35 #include "oops/instanceKlass.hpp"
  36 #include "oops/objArrayOop.hpp"
  37 #include "oops/oop.inline.hpp"
  38 
  39 int ArrayKlass::static_size(int header_size) {
  40   // size of an array klass object
  41   assert(header_size <= InstanceKlass::header_size(), "bad header size");
  42   // If this assert fails, see comments in base_create_array_klass.
  43   header_size = InstanceKlass::header_size();
  44   int vtable_len = Universe::base_vtable_size();
  45 #ifdef _LP64
  46   int size = header_size + align_object_offset(vtable_len);
  47 #else
  48   int size = header_size + vtable_len;
  49 #endif
  50   return align_object_size(size);
  51 }




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/javaClasses.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "classfile/vmSymbols.hpp"
  29 #include "gc/shared/collectedHeap.inline.hpp"
  30 #include "gc/shared/gcLocker.hpp"
  31 #include "jvmtifiles/jvmti.h"

  32 #include "memory/universe.inline.hpp"
  33 #include "oops/arrayKlass.hpp"
  34 #include "oops/arrayOop.hpp"
  35 #include "oops/instanceKlass.hpp"
  36 #include "oops/objArrayOop.hpp"
  37 #include "oops/oop.inline.hpp"
  38 
  39 int ArrayKlass::static_size(int header_size) {
  40   // size of an array klass object
  41   assert(header_size <= InstanceKlass::header_size(), "bad header size");
  42   // If this assert fails, see comments in base_create_array_klass.
  43   header_size = InstanceKlass::header_size();
  44   int vtable_len = Universe::base_vtable_size();
  45 #ifdef _LP64
  46   int size = header_size + align_object_offset(vtable_len);
  47 #else
  48   int size = header_size + vtable_len;
  49 #endif
  50   return align_object_size(size);
  51 }


< prev index next >