907 VerifyDuringStartup || 908 PrintAssembly || 909 tty->count() != 0 || // already printing 910 VerifyAfterGC || 911 VMError::fatal_error_in_progress(), "too expensive"); 912 913 #endif 914 return _young_gen->is_in(p) || _old_gen->is_in(p); 915 } 916 917 #ifdef ASSERT 918 // Don't implement this by using is_in_young(). This method is used 919 // in some cases to check that is_in_young() is correct. 920 bool GenCollectedHeap::is_in_partial_collection(const void* p) { 921 assert(is_in_reserved(p) || p == NULL, 922 "Does not work if address is non-null and outside of the heap"); 923 return p < _young_gen->reserved().end() && p != NULL; 924 } 925 #endif 926 927 void GenCollectedHeap::oop_iterate(ExtendedOopClosure* cl) { 928 _young_gen->oop_iterate(cl); 929 _old_gen->oop_iterate(cl); 930 } 931 932 void GenCollectedHeap::object_iterate(ObjectClosure* cl) { 933 _young_gen->object_iterate(cl); 934 _old_gen->object_iterate(cl); 935 } 936 937 void GenCollectedHeap::safe_object_iterate(ObjectClosure* cl) { 938 _young_gen->safe_object_iterate(cl); 939 _old_gen->safe_object_iterate(cl); 940 } 941 942 Space* GenCollectedHeap::space_containing(const void* addr) const { 943 Space* res = _young_gen->space_containing(addr); 944 if (res != NULL) { 945 return res; 946 } | 907 VerifyDuringStartup || 908 PrintAssembly || 909 tty->count() != 0 || // already printing 910 VerifyAfterGC || 911 VMError::fatal_error_in_progress(), "too expensive"); 912 913 #endif 914 return _young_gen->is_in(p) || _old_gen->is_in(p); 915 } 916 917 #ifdef ASSERT 918 // Don't implement this by using is_in_young(). This method is used 919 // in some cases to check that is_in_young() is correct. 920 bool GenCollectedHeap::is_in_partial_collection(const void* p) { 921 assert(is_in_reserved(p) || p == NULL, 922 "Does not work if address is non-null and outside of the heap"); 923 return p < _young_gen->reserved().end() && p != NULL; 924 } 925 #endif 926 927 void GenCollectedHeap::oop_iterate_no_header(OopClosure* cl) { 928 NoHeaderExtendedOopClosure no_header_cl(cl); 929 oop_iterate(&no_header_cl); 930 } 931 932 void GenCollectedHeap::oop_iterate(ExtendedOopClosure* cl) { 933 _young_gen->oop_iterate(cl); 934 _old_gen->oop_iterate(cl); 935 } 936 937 void GenCollectedHeap::object_iterate(ObjectClosure* cl) { 938 _young_gen->object_iterate(cl); 939 _old_gen->object_iterate(cl); 940 } 941 942 void GenCollectedHeap::safe_object_iterate(ObjectClosure* cl) { 943 _young_gen->safe_object_iterate(cl); 944 _old_gen->safe_object_iterate(cl); 945 } 946 947 Space* GenCollectedHeap::space_containing(const void* addr) const { 948 Space* res = _young_gen->space_containing(addr); 949 if (res != NULL) { 950 return res; 951 } |