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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 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 # include "incls/_precompiled.incl" 26 # include "incls/_collectedHeap.cpp.incl" 27 28 29 #ifdef ASSERT 30 int CollectedHeap::_fire_out_of_memory_count = 0; 31 #endif 32 33 size_t CollectedHeap::_filler_array_max_size = 0; 34 35 // Memory state functions. 36 37 38 CollectedHeap::CollectedHeap() : _n_par_threads(0) 39 40 { 41 const size_t max_len = size_t(arrayOopDesc::max_array_length(T_INT)); 42 const size_t elements_per_word = HeapWordSize / sizeof(jint); 43 _filler_array_max_size = align_object_size(filler_array_hdr_size() + 44 max_len * elements_per_word); 45 46 _barrier_set = NULL; | 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 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 #include "precompiled.hpp" 26 #include "classfile/systemDictionary.hpp" 27 #include "gc_implementation/shared/vmGCOperations.hpp" 28 #include "gc_interface/collectedHeap.hpp" 29 #include "gc_interface/collectedHeap.inline.hpp" 30 #include "oops/oop.inline.hpp" 31 #include "runtime/init.hpp" 32 #include "services/heapDumper.hpp" 33 #ifdef TARGET_OS_FAMILY_linux 34 # include "thread_linux.inline.hpp" 35 #endif 36 #ifdef TARGET_OS_FAMILY_solaris 37 # include "thread_solaris.inline.hpp" 38 #endif 39 #ifdef TARGET_OS_FAMILY_windows 40 # include "thread_windows.inline.hpp" 41 #endif 42 43 44 #ifdef ASSERT 45 int CollectedHeap::_fire_out_of_memory_count = 0; 46 #endif 47 48 size_t CollectedHeap::_filler_array_max_size = 0; 49 50 // Memory state functions. 51 52 53 CollectedHeap::CollectedHeap() : _n_par_threads(0) 54 55 { 56 const size_t max_len = size_t(arrayOopDesc::max_array_length(T_INT)); 57 const size_t elements_per_word = HeapWordSize / sizeof(jint); 58 _filler_array_max_size = align_object_size(filler_array_hdr_size() + 59 max_len * elements_per_word); 60 61 _barrier_set = NULL; |