1.1 --- a/src/share/vm/gc_implementation/g1/ptrQueue.cpp Wed Oct 22 11:18:17 2014 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.cpp Thu Oct 23 12:02:08 2014 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -31,11 +31,15 @@ 1.11 #include "runtime/thread.inline.hpp" 1.12 1.13 PtrQueue::PtrQueue(PtrQueueSet* qset, bool perm, bool active) : 1.14 - _qset(qset), _buf(NULL), _index(0), _active(active), 1.15 + _qset(qset), _buf(NULL), _index(0), _sz(0), _active(active), 1.16 _perm(perm), _lock(NULL) 1.17 {} 1.18 1.19 -void PtrQueue::flush() { 1.20 +PtrQueue::~PtrQueue() { 1.21 + assert(_perm || (_buf == NULL), "queue must be flushed before delete"); 1.22 +} 1.23 + 1.24 +void PtrQueue::flush_impl() { 1.25 if (!_perm && _buf != NULL) { 1.26 if (_index == _sz) { 1.27 // No work to do.