< prev index next >

src/hotspot/share/memory/metaspace/chunkManager.hpp

Print this page
rev 52233 : [mq]: 8177711


  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_MEMORY_METASPACE_CHUNKMANAGER_HPP
  26 #define SHARE_MEMORY_METASPACE_CHUNKMANAGER_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "memory/binaryTreeDictionary.hpp"
  30 #include "memory/freeList.hpp"
  31 #include "memory/metaspace/metachunk.hpp"
  32 #include "memory/metaspace/metaspaceStatistics.hpp"
  33 #include "memory/metaspaceChunkFreeListSummary.hpp"
  34 #include "utilities/globalDefinitions.hpp"
  35 
  36 class TestVirtualSpaceNodeTest;
  37 
  38 namespace metaspace {
  39 
  40 typedef class FreeList<Metachunk> ChunkList;
  41 typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary;
  42 
  43 // Manages the global free lists of chunks.
  44 class ChunkManager : public CHeapObj<mtInternal> {
  45   friend class ::TestVirtualSpaceNodeTest;
  46 
  47   // Free list of chunks of different sizes.
  48   //   SpecializedChunk
  49   //   SmallChunk
  50   //   MediumChunk
  51   ChunkList _free_chunks[NumberOfFreeLists];
  52 
  53   // Whether or not this is the class chunkmanager.
  54   const bool _is_class;
  55 
  56   // Return non-humongous chunk list by its index.
  57   ChunkList* free_chunks(ChunkIndex index);
  58 
  59   // Returns non-humongous chunk list for the given chunk word size.
  60   ChunkList* find_free_chunks_list(size_t word_size);
  61 
  62   //   HumongousChunk
  63   ChunkTreeDictionary _humongous_dictionary;
  64 
  65   // Returns the humongous chunk dictionary.




  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_MEMORY_METASPACE_CHUNKMANAGER_HPP
  26 #define SHARE_MEMORY_METASPACE_CHUNKMANAGER_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "memory/binaryTreeDictionary.hpp"
  30 #include "memory/freeList.hpp"
  31 #include "memory/metaspace/metachunk.hpp"
  32 #include "memory/metaspace/metaspaceStatistics.hpp"
  33 #include "memory/metaspaceChunkFreeListSummary.hpp"
  34 #include "utilities/globalDefinitions.hpp"
  35 
  36 class ChunkManagerTest;
  37 
  38 namespace metaspace {
  39 
  40 typedef class FreeList<Metachunk> ChunkList;
  41 typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary;
  42 
  43 // Manages the global free lists of chunks.
  44 class ChunkManager : public CHeapObj<mtInternal> {
  45   friend class ::ChunkManagerTest;
  46 
  47   // Free list of chunks of different sizes.
  48   //   SpecializedChunk
  49   //   SmallChunk
  50   //   MediumChunk
  51   ChunkList _free_chunks[NumberOfFreeLists];
  52 
  53   // Whether or not this is the class chunkmanager.
  54   const bool _is_class;
  55 
  56   // Return non-humongous chunk list by its index.
  57   ChunkList* free_chunks(ChunkIndex index);
  58 
  59   // Returns non-humongous chunk list for the given chunk word size.
  60   ChunkList* find_free_chunks_list(size_t word_size);
  61 
  62   //   HumongousChunk
  63   ChunkTreeDictionary _humongous_dictionary;
  64 
  65   // Returns the humongous chunk dictionary.


< prev index next >