objArrayOop.hpp revision 2943
151N/A * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 151N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 911N/A * This code is free software; you can redistribute it and/or modify it 851N/A * under the terms of the GNU General Public License version 2 only, as 151N/A * published by the Free Software Foundation. 151N/A * This code is distributed in the hope that it will be useful, but WITHOUT 151N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 151N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 151N/A * version 2 for more details (a copy is included in the LICENSE file that 151N/A * accompanied this code). 151N/A * You should have received a copy of the GNU General Public License version 151N/A * 2 along with this work; if not, write to the Free Software Foundation, 151N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 151N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 151N/A// An objArrayOop is an array containing oops. 151N/A// Evaluating "String arg[10]" will create an objArrayOop. 151N/A // Give size of objArrayOop in HeapWords minus the header 151N/A "Else the following (new) computation would be in error");
151N/A // The old code is left in for sanity-checking; it'll 151N/A // go away pretty soon. XXX 493N/A // Without UseCompressedOops, this is simply: 151N/A // oop->length() * HeapWordsPerOop; 151N/A // With narrowOops, HeapWordsPerOop is 1/2 or equal 0 as an integer. 151N/A // The oop elements are aligned up to wordSize // Returns the offset of the first element. // base is the address following the header. // With UseCompressedOops decode the narrow oop in the objArray to an // uncompressed oop. Otherwise this is simply a "*" operator. // This returns the object size in HeapWords. // special iterators for index ranges, returns size of object #
endif // SHARE_VM_OOPS_OBJARRAYOOP_HPP