jniHandles.hpp revision 1010
917N/A * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A // Resolve handle into oop 0N/A // Resolve externally provided handle into oop with some guards 0N/A // Resolve handle into oop, result guaranteed not to be null 0N/A // Weak global handles 0N/A // jmethodID handling (as Weak global handles). 0N/A // Because the useful life-span of a jmethodID cannot be determined, once created they are 0N/A // never reclaimed. The methods to which they refer, however, can be GC'ed away if the class 0N/A // is unloaded or if the method is made obsolete or deleted -- in these cases, the jmethodID 0N/A // refers to NULL (as is the case for any weak reference). 0N/A // Sentinel marking deleted handles in block. Note that we cannot store NULL as 0N/A // the sentinel, since clearing weak global JNI refs are done by storing NULL in 0N/A // the handle. The handle may not be reused before destroy_weak_global is called. 0N/A // Garbage collection support(global handles only, local handles are traversed from thread) 0N/A // Traversal of regular global handles 0N/A // Traversal of weak global handles. Unreachable oops are cleared. 0N/A int _top;
// Index of next unused handle 0N/A // The following instance variables are only used by the first block in a chain. 0N/A // Having two types of blocks complicates the code and the space overhead in negligble. 0N/A // Fill block with bad_handle values 0N/A // No more handles in the both the current and following blocks 0N/A // Free list computation 0N/A // Handle allocation 0N/A // Block allocation and block free list management 0N/A // Stub generator support 0N/A // Garbage collection support 0N/A // Traversal of regular handles 0N/A // Traversal of weak handles. Unreachable oops are cleared. 0N/A int length()
const;
// Length of chain starting with this block 0N/A // Don't let that private _deleted_handle object escape into the wild.