/* * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * 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. *
*/
// A MutableSpace supports the concept of allocation. This includes the // concepts that a space may be only partially full, and the query methods // that go with such an assumption. // // MutableSpace is also responsible for minimizing the // page allocation time by having the memory pretouched (with // AlwaysPretouch) and for optimizing page placement on NUMA systems // by make the underlying region interleaved (with UseNUMA). // // Invariant: bottom() <= top() <= end() // top() and end() are exclusive.
class MutableSpaceMangler;
class MutableSpace: public CHeapObj<mtGC> { friendclass VMStructs;
// Helper for mangling unused space in debug builds
MutableSpaceMangler* _mangler; // The last region which page had been setup to be interleaved.
MemRegion _last_setup_region;
size_t _alignment;
HeapWord* _bottom;
HeapWord* volatile _top;
HeapWord* _end;
// Allocation (return NULL if full) virtual HeapWord* cas_allocate(size_t word_size); // Optional deallocation. Used in NUMA-allocator. bool cas_deallocate(HeapWord *obj, size_t size); // Return true if this space needs to be expanded in order to satisfy an // allocation request of the indicated size. Concurrent allocations and // resizes may change the result of a later call. Used by oldgen allocator. // precondition: holding PSOldGenExpand_lock bool needs_expand(size_t word_size) const;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.