< prev index next >
src/share/vm/memory/metaspace.hpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 102,119 ****
AnonymousMetaspaceType,
ReflectionMetaspaceType
};
private:
void initialize(Mutex* lock, MetaspaceType type);
! // Get the first chunk for a Metaspace. Used for
// special cases such as the boot class loader, reflection
// class loader and anonymous class loader.
! Metachunk* get_initialization_chunk(MetadataType mdtype,
! size_t chunk_word_size,
! size_t chunk_bunch);
// Align up the word size to the allocation word size
static size_t align_word_size_up(size_t);
// Aligned size of the metaspace.
--- 102,120 ----
AnonymousMetaspaceType,
ReflectionMetaspaceType
};
private:
+ static void verify_global_initialization();
+
void initialize(Mutex* lock, MetaspaceType type);
! // Initialize the first chunk for a Metaspace. Used for
// special cases such as the boot class loader, reflection
// class loader and anonymous class loader.
! void initialize_first_chunk(MetaspaceType type, MetadataType mdtype);
! Metachunk* get_initialization_chunk(MetaspaceType type, MetadataType mdtype);
// Align up the word size to the allocation word size
static size_t align_word_size_up(size_t);
// Aligned size of the metaspace.
*** 136,145 ****
--- 137,150 ----
SpaceManager* _vsm;
SpaceManager* vsm() const { return _vsm; }
SpaceManager* _class_vsm;
SpaceManager* class_vsm() const { return _class_vsm; }
+ SpaceManager* get_space_manager(MetadataType mdtype) {
+ assert(mdtype != MetadataTypeCount, "MetadaTypeCount can't be used as mdtype");
+ return mdtype == ClassType ? class_vsm() : vsm();
+ }
// Allocate space for metadata of type mdtype. This is space
// within a Metachunk and is used by
// allocate(ClassLoaderData*, size_t, bool, MetadataType, TRAPS)
MetaWord* allocate(size_t word_size, MetadataType mdtype);
< prev index next >