1 /* |
1 /* |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
44 size_t, size_t, size_t, size_t); |
44 size_t, size_t, size_t, size_t); |
45 #endif /* !USDT2 */ |
45 #endif /* !USDT2 */ |
46 |
46 |
47 MemoryManager::MemoryManager() { |
47 MemoryManager::MemoryManager() { |
48 _num_pools = 0; |
48 _num_pools = 0; |
49 (void)const_cast<instanceOop&>(_memory_mgr_obj = NULL); |
49 (void)const_cast<instanceOop&>(_memory_mgr_obj = instanceOop(NULL)); |
50 } |
50 } |
51 |
51 |
52 void MemoryManager::add_pool(MemoryPool* pool) { |
52 void MemoryManager::add_pool(MemoryPool* pool) { |
53 assert(_num_pools < MemoryManager::max_num_pools, "_num_pools exceeds the max"); |
53 assert(_num_pools < MemoryManager::max_num_pools, "_num_pools exceeds the max"); |
54 if (_num_pools < MemoryManager::max_num_pools) { |
54 if (_num_pools < MemoryManager::max_num_pools) { |