comparison src/share/vm/oops/arrayOop.hpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 3c648b9ad052
children 7944aba7ba41
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
33 // in each instance, which we don't want. 33 // in each instance, which we don't want.
34 34
35 // The layout of array Oops is: 35 // The layout of array Oops is:
36 // 36 //
37 // markOop 37 // markOop
38 // klassOop // 32 bits if compressed but declared 64 in LP64. 38 // Klass* // 32 bits if compressed but declared 64 in LP64.
39 // length // shares klass memory or allocated after declared fields. 39 // length // shares klass memory or allocated after declared fields.
40 40
41 41
42 class arrayOopDesc : public oopDesc { 42 class arrayOopDesc : public oopDesc {
43 friend class VMStructs; 43 friend class VMStructs;
63 public: 63 public:
64 // The _length field is not declared in C++. It is allocated after the 64 // The _length field is not declared in C++. It is allocated after the
65 // declared nonstatic fields in arrayOopDesc if not compressed, otherwise 65 // declared nonstatic fields in arrayOopDesc if not compressed, otherwise
66 // it occupies the second half of the _klass field in oopDesc. 66 // it occupies the second half of the _klass field in oopDesc.
67 static int length_offset_in_bytes() { 67 static int length_offset_in_bytes() {
68 return UseCompressedOops ? klass_gap_offset_in_bytes() : 68 return UseCompressedKlassPointers ? klass_gap_offset_in_bytes() :
69 sizeof(arrayOopDesc); 69 sizeof(arrayOopDesc);
70 } 70 }
71 71
72 // Returns the offset of the first element. 72 // Returns the offset of the first element.
73 static int base_offset_in_bytes(BasicType type) { 73 static int base_offset_in_bytes(BasicType type) {