hotspot/src/share/vm/gc/g1/ptrQueue.cpp
changeset 46305 bff6d23aa1e3
parent 37065 c00d1c2ffb7c
child 46443 cdb638b5ec53
equal deleted inserted replaced
46304:8d4d88f90669 46305:bff6d23aa1e3
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    40 PtrQueue::~PtrQueue() {
    40 PtrQueue::~PtrQueue() {
    41   assert(_permanent || (_buf == NULL), "queue must be flushed before delete");
    41   assert(_permanent || (_buf == NULL), "queue must be flushed before delete");
    42 }
    42 }
    43 
    43 
    44 void PtrQueue::flush_impl() {
    44 void PtrQueue::flush_impl() {
    45   if (!_permanent && _buf != NULL) {
    45   if (_buf != NULL) {
    46     BufferNode* node = BufferNode::make_node_from_buffer(_buf, _index);
    46     BufferNode* node = BufferNode::make_node_from_buffer(_buf, _index);
    47     if (is_empty()) {
    47     if (is_empty()) {
    48       // No work to do.
    48       // No work to do.
    49       qset()->deallocate_buffer(node);
    49       qset()->deallocate_buffer(node);
    50     } else {
    50     } else {