< prev index next >

src/hotspot/share/oops/array.hpp

Print this page




   8  *
   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 #ifndef SHARE_VM_OOPS_ARRAY_HPP
  26 #define SHARE_VM_OOPS_ARRAY_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "memory/metaspace.hpp"
  30 #include "utilities/align.hpp"
  31 
  32 // Array for metadata allocation
  33 
  34 template <typename T>
  35 class Array: public MetaspaceObj {
  36   friend class MetadataFactory;
  37   friend class MetaspaceShared;
  38   friend class VMStructs;
  39   friend class JVMCIVMStructs;
  40   friend class MethodHandleCompiler;           // special case
  41   friend class WhiteBox;
  42 protected:
  43   int _length;                                 // the number of array elements
  44   T   _data[1];                                // the array memory
  45 
  46   void initialize(int length) {
  47     _length = length;
  48   }




   8  *
   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 #ifndef SHARE_VM_OOPS_ARRAY_HPP
  26 #define SHARE_VM_OOPS_ARRAY_HPP
  27 

  28 #include "memory/metaspace.hpp"
  29 #include "utilities/align.hpp"
  30 
  31 // Array for metadata allocation
  32 
  33 template <typename T>
  34 class Array: public MetaspaceObj {
  35   friend class MetadataFactory;
  36   friend class MetaspaceShared;
  37   friend class VMStructs;
  38   friend class JVMCIVMStructs;
  39   friend class MethodHandleCompiler;           // special case
  40   friend class WhiteBox;
  41 protected:
  42   int _length;                                 // the number of array elements
  43   T   _data[1];                                // the array memory
  44 
  45   void initialize(int length) {
  46     _length = length;
  47   }


< prev index next >