equal
deleted
inserted
replaced
146 |
146 |
147 // The following instance variables are only used by the first block in a chain. |
147 // The following instance variables are only used by the first block in a chain. |
148 // Having two types of blocks complicates the code and the space overhead in negligible. |
148 // Having two types of blocks complicates the code and the space overhead in negligible. |
149 JNIHandleBlock* _last; // Last block in use |
149 JNIHandleBlock* _last; // Last block in use |
150 JNIHandleBlock* _pop_frame_link; // Block to restore on PopLocalFrame call |
150 JNIHandleBlock* _pop_frame_link; // Block to restore on PopLocalFrame call |
|
151 oop* _free_list; // Handle free list |
|
152 int _allocate_before_rebuild; // Number of blocks to allocate before rebuilding free list |
151 |
153 |
152 // Check JNI, "planned capacity" for current frame (or push/ensure) |
154 // Check JNI, "planned capacity" for current frame (or push/ensure) |
153 size_t _planned_capacity; |
155 size_t _planned_capacity; |
154 |
156 |
155 #ifndef PRODUCT |
157 #ifndef PRODUCT |
160 static JNIHandleBlock* _block_free_list; // Free list of currently unused blocks |
162 static JNIHandleBlock* _block_free_list; // Free list of currently unused blocks |
161 static int _blocks_allocated; // For debugging/printing |
163 static int _blocks_allocated; // For debugging/printing |
162 |
164 |
163 // Fill block with bad_handle values |
165 // Fill block with bad_handle values |
164 void zap() NOT_DEBUG_RETURN; |
166 void zap() NOT_DEBUG_RETURN; |
|
167 |
|
168 // Free list computation |
|
169 void rebuild_free_list(); |
165 |
170 |
166 // No more handles in the both the current and following blocks |
171 // No more handles in the both the current and following blocks |
167 void clear() { _top = 0; } |
172 void clear() { _top = 0; } |
168 |
173 |
169 public: |
174 public: |