2362N/A * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// A per-thread allocation buffer used during GC. 0N/A // In support of ergonomic sizing of PLAB's 0N/A // Flush the stats supporting ergonomic sizing of PLAB's 0N/A // Should not be called directly 0N/A // Initializes the buffer to be empty, but with the given "word_sz". 0N/A // Must get initialized with "set_buf" for an allocation to succeed. 0N/A // If an allocation of the given "word_sz" can be satisfied within the 0N/A // buffer, do the allocation, returning a pointer to the start of the 0N/A // allocated block. If the allocation request cannot be satisfied, 0N/A // Undo the last allocation in the buffer, which is required to be of the 0N/A // "obj" of the given "word_sz". 0N/A // The total (word) size of the buffer, including both allocated and 0N/A // unallocted space. 0N/A // Should only be done if we are about to reset with a new buffer of the 1947N/A // The number of words of unallocated space remaining in the buffer. 0N/A // Sets the space of the buffer to be [buf, space+word_sz()). 0N/A // In support of ergonomic sizing 0N/A // Flush the stats supporting ergonomic sizing of PLAB's 0N/A // and retire the current buffer. 0N/A // We flush the stats first in order to get a reading of 0N/A // unused space in the last buffer. 0N/A // Since we have flushed the stats we need to clear 0N/A // the _allocated and _wasted fields. Not doing so 0N/A // will artifically inflate the values in the stats 0N/A // to which we add them. 0N/A // The next time we flush these values, we will add 0N/A // what we have just flushed in addition to the size 0N/A // of the buffers allocated between now and then. 0N/A // Retire the last allocation buffer. 0N/A // Force future allocations to fail and queries for contains() 0N/A // Fills in the unallocated portion of the buffer with a garbage object. 0N/A // If "end_of_gc" is TRUE, is after the last use in the GC. IF "retain" 0N/A // is true, attempt to re-use the unused portion in the next GC. 0N/A// PLAB stats book-keeping "PLAB clipping computation in adjust_desired_plab_sz()" // filter computation, latches output to // _desired_plab_sz, clears sensor accumulators #
endif // SHARE_VM_GC_IMPLEMENTATION_PARNEW_PARGCALLOCBUFFER_HPP