collectedHeap.cpp revision 0
1472N/A * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. 1334N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1334N/A * This code is free software; you can redistribute it and/or modify it 1334N/A * under the terms of the GNU General Public License version 2 only, as 1334N/A * published by the Free Software Foundation. 1334N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1334N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1334N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1334N/A * version 2 for more details (a copy is included in the LICENSE file that 1334N/A * You should have received a copy of the GNU General Public License version 1334N/A * 2 along with this work; if not, write to the Free Software Foundation, 1334N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1472N/A * CA 95054 USA or visit www.sun.com if you need additional information or 1334N/A#
include "incls/_precompiled.incl" 1334N/A // create the gc cause jvmstat counters 1334N/A "Found badHeapWordValue in post-allocation check");
"Found non badHeapWordValue in pre-allocation check");
// How to choose between a pending exception and a potential // OutOfMemoryError? Don't allow pending exceptions. // This is a VM policy failure, so how do we exhaustively test it? "shouldn't be allocating with pending exception");
"Allocation done by thread for which allocation is blocked " "by No_Allocation_Verifier!");
// Allocation of an oop can always invoke a safepoint, // hence, the true argument // Retain tlab and allocate object in shared space if // the amount free in the tlab is too large to discard. // Discard tlab and allocate a new one. // To minimize fragmentation, the last TLAB may be smaller than the rest. // Allocate a new TLAB... // ...and clear just the allocated object. // %%% This needs refactoring. (It was imported from the server compiler.) // %%% This needs refactoring. (It was gating logic from the server compiler.) guarantee(
false,
"thread-local allocation buffers not supported");
// See note in ensure_parsability() below. "should only fill tlabs at safepoint");
// The main thread starts allocating via a TLAB even before it // has added itself to the threads list at vm boot-up. "Attempt to fill tlabs before main thread has been added" " to threads list is doomed to failure!");
// The second disjunct in the assertion below makes a concession // for the start-up verification done while the VM is being // created. Callers be careful that you know that mutators // aren't going to interfere -- for instance, this is permissible // if we are still single-threaded and have either not yet // started allocating (nothing much to verify) or we have // started allocating but are now a full-fledged JavaThread // (and have thus made our TLAB's) available for filling. "Should only be called at a safepoint or at start-up" " otherwise concurrent mutator activity may make heap " "should only accumulate statistics on tlabs at safepoint");
"should only resize tlabs at safepoint");