1.1 --- a/src/share/vm/gc_implementation/g1/ptrQueue.hpp Mon Mar 02 16:37:04 2009 -0800 1.2 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.hpp Fri Mar 06 13:50:14 2009 -0800 1.3 @@ -155,6 +155,9 @@ 1.4 Mutex* _fl_lock; 1.5 void** _buf_free_list; 1.6 size_t _buf_free_list_sz; 1.7 + // Queue set can share a freelist. The _fl_owner variable 1.8 + // specifies the owner. It is set to "this" by default. 1.9 + PtrQueueSet* _fl_owner; 1.10 1.11 // The size of all buffers in the set. 1.12 size_t _sz; 1.13 @@ -188,10 +191,13 @@ 1.14 // Because of init-order concerns, we can't pass these as constructor 1.15 // arguments. 1.16 void initialize(Monitor* cbl_mon, Mutex* fl_lock, 1.17 - int max_completed_queue = 0) { 1.18 + int max_completed_queue = 0, 1.19 + PtrQueueSet *fl_owner = NULL) { 1.20 _max_completed_queue = max_completed_queue; 1.21 assert(cbl_mon != NULL && fl_lock != NULL, "Init order issue?"); 1.22 - _cbl_mon = cbl_mon; _fl_lock = fl_lock; 1.23 + _cbl_mon = cbl_mon; 1.24 + _fl_lock = fl_lock; 1.25 + _fl_owner = (fl_owner != NULL) ? fl_owner : this; 1.26 } 1.27 1.28 // Return an empty oop array of size _sz (required to be non-zero). 1.29 @@ -228,4 +234,7 @@ 1.30 void reduce_free_list(); 1.31 1.32 size_t completed_buffers_num() { return _n_completed_buffers; } 1.33 + 1.34 + void merge_bufferlists(PtrQueueSet* src); 1.35 + void merge_freelists(PtrQueueSet* src); 1.36 };