/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "gc_implementation/parallelScavenge/psPromotionLAB.hpp"
#include "gc_implementation/shared/mutableSpace.hpp"
#include "oops/oop.inline.hpp"
// This is the shared initialization code. It sets up the basic pointers,
// and allows enough extra space for a filler object. We call a virtual
// labs require.
// Initialize after VM starts up because header_size depends on compressed
// oops.
// We can be initialized to a zero size!
if (free() > 0) {
if (ZapUnusedHeapArea) {
}
// NOTE! We need to allow space for a filler object.
} else {
}
}
// Fill all remaining lab space with an unreachable object.
// The goal is to leave a contiguous parseable span of objects.
// If we were initialized to a zero sized lab, there is
// nothing to flush
return;
// PLAB's never allocate the last aligned_header_size
// so they can always fill with an array.
assert( (array_length * (HeapWordSize/sizeof(jint))) < (size_t)max_jint, "array too big in PSPromotionLAB");
#ifdef ASSERT
// Note that we actually DO NOT want to use the aligned header size!
#endif
}
return true;
}
return false;
}
// Fill all remaining lab space with an unreachable object.
// The goal is to leave a contiguous parseable span of objects.
return;
PSPromotionLAB::flush();
}
#ifdef ASSERT
return true;
}
return false;
}
return true;
}
return false;
}
#endif /* ASSERT */