equal
deleted
inserted
replaced
146 |
146 |
147 static JNIHandleBlock* _block_free_list; // Free list of currently unused blocks |
147 static JNIHandleBlock* _block_free_list; // Free list of currently unused blocks |
148 static int _blocks_allocated; // For debugging/printing |
148 static int _blocks_allocated; // For debugging/printing |
149 |
149 |
150 // Fill block with bad_handle values |
150 // Fill block with bad_handle values |
151 void zap(); |
151 void zap() NOT_DEBUG_RETURN; |
152 |
152 |
153 // Free list computation |
153 // Free list computation |
154 void rebuild_free_list(); |
154 void rebuild_free_list(); |
155 |
155 |
156 // No more handles in the both the current and following blocks |
156 // No more handles in the both the current and following blocks |
217 // Treat deleted (and possibly zapped) as NULL for external_guard, |
217 // Treat deleted (and possibly zapped) as NULL for external_guard, |
218 // else as (asserted) error. |
218 // else as (asserted) error. |
219 template<bool external_guard> |
219 template<bool external_guard> |
220 inline oop JNIHandles::guard_value(oop value) { |
220 inline oop JNIHandles::guard_value(oop value) { |
221 if (!external_guard) { |
221 if (!external_guard) { |
222 assert(value != badJNIHandle, "Pointing to zapped jni handle area"); |
|
223 assert(value != deleted_handle(), "Used a deleted global handle"); |
222 assert(value != deleted_handle(), "Used a deleted global handle"); |
224 } else if ((value == badJNIHandle) || (value == deleted_handle())) { |
223 } else if (value == deleted_handle()) { |
225 value = NULL; |
224 value = NULL; |
226 } |
225 } |
227 return value; |
226 return value; |
228 } |
227 } |
229 |
228 |