1636N/A * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 187N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 187N/A * This code is free software; you can redistribute it and/or modify it 187N/A * under the terms of the GNU General Public License version 2 only, as 187N/A * published by the Free Software Foundation. 187N/A * This code is distributed in the hope that it will be useful, but WITHOUT 187N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 187N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 187N/A * version 2 for more details (a copy is included in the LICENSE file that 187N/A * accompanied this code). 187N/A * You should have received a copy of the GNU General Public License version 187N/A * 2 along with this work; if not, write to the Free Software Foundation, 187N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 187N/A// Free block maintenance for Concurrent Mark Sweep Generation 187N/A// The main data structure for free blocks are 187N/A// . an indexed array of small free blocks, and 187N/A// . a dictionary of large free blocks 187N/A// No virtuals in FreeChunk (don't want any vtables). 187N/A// A FreeChunk is merely a chunk that can be in a doubly linked list 187N/A// and has a size field. NOTE: FreeChunks are distinguished from allocated 187N/A// objects in two ways (by the sweeper), depending on whether the VM is 32 or 187N/A// In 32 bits or 64 bits without CompressedOops, the second word (prev) has the 187N/A// LSB set to indicate a free chunk; allocated objects' klass() pointers 187N/A// don't have their LSB set. The corresponding bit in the CMSBitMap is 187N/A// set when the chunk is allocated. There are also blocks that "look free" 187N/A// but are not part of the free list and should not be coalesced into larger 187N/A// free blocks. These free blocks have their two LSB's set. 187N/A // For 64 bit compressed oops, the markOop encodes both the size and the 187N/A // indication that this is a FreeChunk and not an object. 187N/A // Returns "true" if the address indicates that the block represents 187N/A // Force volatile read from addr because value might change between 187N/A // calls. We really want the read of _mark and _prev from this pointer 187N/A // to be volatile but making the fields volatile causes all sorts of 187N/A // the block should be free 1636N/A // Set _prev (klass) to null before (if) clearing the mark word below 187N/A // Return the address past the end of this chunk 1879N/A#
endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_FREECHUNK_HPP