src/share/vm/gc_implementation/g1/ptrQueue.cpp

changeset 7445
42c091d63c72
parent 6198
55fb97c4c58d
child 7535
7ae4e26cb1e0
     1.1 --- a/src/share/vm/gc_implementation/g1/ptrQueue.cpp	Tue Aug 12 17:46:16 2014 -0400
     1.2 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.cpp	Mon Aug 04 10:49:40 2014 -0400
     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.

mercurial