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 #include "precompiled.hpp"
25
26 #include "logging/log.hpp"
27 #include "logging/logStream.hpp"
28 #include "memory/metaspace/chunkManager.hpp"
29 #include "memory/metaspace/metachunk.hpp"
30 #include "memory/metaspace/metaDebug.hpp"
31 #include "memory/metaspace/metaspaceCommon.hpp"
32 #include "memory/metaspace/spaceManager.hpp"
33 #include "memory/metaspace/virtualSpaceList.hpp"
34 #include "runtime/atomic.hpp"
35 #include "runtime/init.hpp"
36 #include "services/memoryService.hpp"
37 #include "utilities/debug.hpp"
38 #include "utilities/globalDefinitions.hpp"
39
40 namespace metaspace {
41
42 #define assert_counter(expected_value, real_value, msg) \
43 assert( (expected_value) == (real_value), \
44 "Counter mismatch (%s): expected " SIZE_FORMAT \
45 ", but got: " SIZE_FORMAT ".", msg, expected_value, \
46 real_value);
47
48 // SpaceManager methods
49
50 size_t SpaceManager::adjust_initial_chunk_size(size_t requested, bool is_class_space) {
51 size_t chunk_sizes[] = {
52 specialized_chunk_size(is_class_space),
53 small_chunk_size(is_class_space),
54 medium_chunk_size(is_class_space)
55 };
|
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 #include "precompiled.hpp"
25
26 #include "logging/log.hpp"
27 #include "logging/logStream.hpp"
28 #include "memory/metaspace/chunkManager.hpp"
29 #include "memory/metaspace/metachunk.hpp"
30 #include "memory/metaspace/metaDebug.hpp"
31 #include "memory/metaspace/metaspaceCommon.hpp"
32 #include "memory/metaspace/spaceManager.hpp"
33 #include "memory/metaspace/virtualSpaceList.hpp"
34 #include "runtime/atomic.hpp"
35 #include "runtime/init.hpp"
36 #include "runtime/mutexLocker.inline.hpp"
37 #include "services/memoryService.hpp"
38 #include "utilities/debug.hpp"
39 #include "utilities/globalDefinitions.hpp"
40
41 namespace metaspace {
42
43 #define assert_counter(expected_value, real_value, msg) \
44 assert( (expected_value) == (real_value), \
45 "Counter mismatch (%s): expected " SIZE_FORMAT \
46 ", but got: " SIZE_FORMAT ".", msg, expected_value, \
47 real_value);
48
49 // SpaceManager methods
50
51 size_t SpaceManager::adjust_initial_chunk_size(size_t requested, bool is_class_space) {
52 size_t chunk_sizes[] = {
53 specialized_chunk_size(is_class_space),
54 small_chunk_size(is_class_space),
55 medium_chunk_size(is_class_space)
56 };
|