src/hotspot/share/memory/metachunk.hpp
author stuefe
Tue, 24 Oct 2017 14:34:14 +0200
changeset 47808 57752bd5d1b4
parent 47216 71c04702a3d5
child 49364 601146c66cad
child 49365 825f006619e5
permissions -rw-r--r--
8189864: Provide an ascii map to visualize metaspace fragmentation Reviewed-by: goetz, coleenp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     1
/*
42017
ed85071e7d9d 8166804: Convert TestMetachunk_test to GTest
kzhaldyb
parents: 36829
diff changeset
     2
 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     4
 *
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     7
 * published by the Free Software Foundation.
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     8
 *
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    13
 * accompanied this code).
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    14
 *
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    18
 *
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    21
 * questions.
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    22
 *
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    23
 */
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    24
#ifndef SHARE_VM_MEMORY_METACHUNK_HPP
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    25
#define SHARE_VM_MEMORY_METACHUNK_HPP
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    26
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    27
#include "memory/allocation.hpp"
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    28
#include "utilities/debug.hpp"
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    29
#include "utilities/globalDefinitions.hpp"
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    30
17101
3a82a58d9aa9 8011268: NPG: Free unused VirtualSpaceNodes
jmasa
parents: 15086
diff changeset
    31
class VirtualSpaceNode;
3a82a58d9aa9 8011268: NPG: Free unused VirtualSpaceNodes
jmasa
parents: 15086
diff changeset
    32
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    33
// Super class of Metablock and Metachunk to allow them to
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    34
// be put on the FreeList and in the BinaryTreeDictionary.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    35
template <class T>
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    36
class Metabase VALUE_OBJ_CLASS_SPEC {
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    37
  size_t _word_size;
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    38
  T*     _next;
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    39
  T*     _prev;
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    40
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    41
 protected:
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    42
  Metabase(size_t word_size) : _word_size(word_size), _next(NULL), _prev(NULL) {}
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    43
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    44
 public:
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    45
  T* next() const         { return _next; }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    46
  T* prev() const         { return _prev; }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    47
  void set_next(T* v)     { _next = v; assert(v != this, "Boom");}
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    48
  void set_prev(T* v)     { _prev = v; assert(v != this, "Boom");}
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    49
  void clear_next()       { set_next(NULL); }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    50
  void clear_prev()       { set_prev(NULL); }
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    51
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    52
  size_t size() const volatile { return _word_size; }
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    53
  void set_size(size_t v) { _word_size = v; }
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    54
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    55
  void link_next(T* ptr)  { set_next(ptr); }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    56
  void link_prev(T* ptr)  { set_prev(ptr); }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    57
  void link_after(T* ptr) {
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    58
    link_next(ptr);
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    59
    if (ptr != NULL) ptr->link_prev((T*)this);
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    60
  }
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    61
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    62
  uintptr_t* end() const        { return ((uintptr_t*) this) + size(); }
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    63
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    64
  bool cantCoalesce() const     { return false; }
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    65
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    66
  // Debug support
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    67
#ifdef ASSERT
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    68
  void* prev_addr() const { return (void*)&_prev; }
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    69
  void* next_addr() const { return (void*)&_next; }
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    70
  void* size_addr() const { return (void*)&_word_size; }
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    71
#endif
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    72
  bool verify_chunk_in_free_list(T* tc) const { return true; }
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    73
  bool verify_par_locked() { return true; }
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    74
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    75
  void assert_is_mangled() const {/* Don't check "\*/}
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
    76
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    77
  bool is_free()                 { return true; }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    78
};
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    79
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    80
//  Metachunk - Quantum of allocation from a Virtualspace
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    81
//    Metachunks are reused (when freed are put on a global freelist) and
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    82
//    have no permanent association to a SpaceManager.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    83
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    84
//            +--------------+ <- end    --+       --+
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    85
//            |              |             |         |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    86
//            |              |             | free    |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    87
//            |              |             |         |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    88
//            |              |             |         | size | capacity
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    89
//            |              |             |         |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    90
//            |              | <- top   -- +         |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    91
//            |              |             |         |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    92
//            |              |             | used    |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    93
//            |              |             |         |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    94
//            |              |             |         |
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    95
//            +--------------+ <- bottom --+       --+
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    96
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    97
class Metachunk : public Metabase<Metachunk> {
42017
ed85071e7d9d 8166804: Convert TestMetachunk_test to GTest
kzhaldyb
parents: 36829
diff changeset
    98
  friend class MetachunkTest;
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
    99
  // The VirtualSpaceNode containing this chunk.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   100
  VirtualSpaceNode* _container;
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   101
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   102
  // Current allocation top.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   103
  MetaWord* _top;
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   104
47808
57752bd5d1b4 8189864: Provide an ascii map to visualize metaspace fragmentation
stuefe
parents: 47216
diff changeset
   105
  bool _is_tagged_free;
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   106
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   107
  MetaWord* initial_top() const { return (MetaWord*)this + overhead(); }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   108
  MetaWord* top() const         { return _top; }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   109
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   110
 public:
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   111
  // Metachunks are allocated out of a MetadataVirtualSpace and
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   112
  // and use some of its space to describe itself (plus alignment
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   113
  // considerations).  Metadata is allocated in the rest of the chunk.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   114
  // This size is the overhead of maintaining the Metachunk within
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   115
  // the space.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   116
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   117
  // Alignment of each allocation in the chunks.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   118
  static size_t object_alignment();
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   119
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   120
  // Size of the Metachunk header, including alignment.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   121
  static size_t overhead();
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   122
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   123
  Metachunk(size_t word_size , VirtualSpaceNode* container);
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   124
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   125
  MetaWord* allocate(size_t word_size);
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   126
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   127
  VirtualSpaceNode* container() const { return _container; }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   128
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   129
  MetaWord* bottom() const { return (MetaWord*) this; }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   130
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   131
  // Reset top to bottom so chunk can be reused.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   132
  void reset_empty() { _top = initial_top(); clear_next(); clear_prev(); }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   133
  bool is_empty() { return _top == initial_top(); }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   134
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   135
  // used (has been allocated)
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   136
  // free (available for future allocations)
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   137
  size_t word_size() const { return size(); }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   138
  size_t used_word_size() const;
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   139
  size_t free_word_size() const;
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   140
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   141
  bool is_tagged_free() { return _is_tagged_free; }
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   142
  void set_is_tagged_free(bool v) { _is_tagged_free = v; }
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
   143
22201
9c2ccfa3a5fe 8029178: Parallel class loading test anonymous-simple gets SIGSEGV in Metaspace::contains
coleenp
parents: 20732
diff changeset
   144
  bool contains(const void* ptr) { return bottom() <= ptr && ptr < _top; }
9c2ccfa3a5fe 8029178: Parallel class loading test anonymous-simple gets SIGSEGV in Metaspace::contains
coleenp
parents: 20732
diff changeset
   145
36829
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 22201
diff changeset
   146
#ifndef PRODUCT
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 22201
diff changeset
   147
  void mangle(juint word_value);
dd6004c32d75 8151623: Zap freed Metaspace chunks in non-product binaries
vlivanov
parents: 22201
diff changeset
   148
#endif
20732
39d1710a9a1c 8026707: JDK-8026391 broke the optimized build target
stefank
parents: 20729
diff changeset
   149
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
   150
  void print_on(outputStream* st) const;
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
   151
  void verify();
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
   152
};
20729
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   153
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   154
// Metablock is the unit of allocation from a Chunk.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   155
//
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   156
// A Metablock may be reused by its SpaceManager but are never moved between
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   157
// SpaceManagers.  There is no explicit link to the Metachunk
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   158
// from which it was allocated.  Metablock may be deallocated and
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   159
// put on a freelist but the space is never freed, rather
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   160
// the Metachunk it is a part of will be deallocated when it's
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   161
// associated class loader is collected.
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   162
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   163
class Metablock : public Metabase<Metablock> {
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   164
  friend class VMStructs;
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   165
 public:
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   166
  Metablock(size_t word_size) : Metabase<Metablock>(word_size) {}
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   167
};
0a687ee7097d 8026391: The Metachunk header wastes memory
stefank
parents: 17101
diff changeset
   168
14123
944e56f74fba 7045397: NPG: Add freelists to class loader arenas.
jmasa
parents:
diff changeset
   169
#endif  // SHARE_VM_MEMORY_METACHUNK_HPP