comparison src/share/vm/memory/sharedHeap.cpp @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents a61af66fc99e
children d1605aabd0a1 37f87013dfd8
comparison
equal deleted inserted replaced
110:a49a647afe9a 113:ba764ed4b6f2
72 _process_strong_tasks->set_par_threads(t); 72 _process_strong_tasks->set_par_threads(t);
73 } 73 }
74 74
75 class AssertIsPermClosure: public OopClosure { 75 class AssertIsPermClosure: public OopClosure {
76 public: 76 public:
77 void do_oop(oop* p) { 77 virtual void do_oop(oop* p) {
78 assert((*p) == NULL || (*p)->is_perm(), "Referent should be perm."); 78 assert((*p) == NULL || (*p)->is_perm(), "Referent should be perm.");
79 } 79 }
80 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
80 }; 81 };
81 static AssertIsPermClosure assert_is_perm_closure; 82 static AssertIsPermClosure assert_is_perm_closure;
82 83
83 void SharedHeap::change_strong_roots_parity() { 84 void SharedHeap::change_strong_roots_parity() {
84 // Also set the new collection parity. 85 // Also set the new collection parity.
185 class SkipAdjustingSharedStrings: public OopClosure { 186 class SkipAdjustingSharedStrings: public OopClosure {
186 OopClosure* _clo; 187 OopClosure* _clo;
187 public: 188 public:
188 SkipAdjustingSharedStrings(OopClosure* clo) : _clo(clo) {} 189 SkipAdjustingSharedStrings(OopClosure* clo) : _clo(clo) {}
189 190
190 void do_oop(oop* p) { 191 virtual void do_oop(oop* p) {
191 oop o = (*p); 192 oop o = (*p);
192 if (!o->is_shared_readwrite()) { 193 if (!o->is_shared_readwrite()) {
193 _clo->do_oop(p); 194 _clo->do_oop(p);
194 } 195 }
195 } 196 }
197 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); }
196 }; 198 };
197 199
198 // Unmarked shared Strings in the StringTable (which got there due to 200 // Unmarked shared Strings in the StringTable (which got there due to
199 // being in the constant pools of as-yet unloaded shared classes) were 201 // being in the constant pools of as-yet unloaded shared classes) were
200 // not marked and therefore did not have their mark words preserved. 202 // not marked and therefore did not have their mark words preserved.