Mercurial > hg > truffle
comparison src/share/vm/runtime/jniHandles.cpp @ 14314:2c95095271e9
Merge
author | ehelin |
---|---|
date | Thu, 30 Jan 2014 14:01:45 +0100 |
parents | ab67ce0bfae2 63a4eb8bcd23 |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
14302:1fb56cbac3a1 | 14314:2c95095271e9 |
---|---|
461 rebuild_free_list(); // updates _allocate_before_rebuild counter | 461 rebuild_free_list(); // updates _allocate_before_rebuild counter |
462 } else { | 462 } else { |
463 // Append new block | 463 // Append new block |
464 Thread* thread = Thread::current(); | 464 Thread* thread = Thread::current(); |
465 Handle obj_handle(thread, obj); | 465 Handle obj_handle(thread, obj); |
466 // This can block, so we need to preserve obj accross call. | 466 // This can block, so we need to preserve obj across call. |
467 _last->_next = JNIHandleBlock::allocate_block(thread); | 467 _last->_next = JNIHandleBlock::allocate_block(thread); |
468 _last = _last->_next; | 468 _last = _last->_next; |
469 _allocate_before_rebuild--; | 469 _allocate_before_rebuild--; |
470 obj = obj_handle(); | 470 obj = obj_handle(); |
471 } | 471 } |
528 result++; | 528 result++; |
529 } | 529 } |
530 return result; | 530 return result; |
531 } | 531 } |
532 | 532 |
533 // This method is not thread-safe, i.e., must be called whule holding a lock on the | 533 // This method is not thread-safe, i.e., must be called while holding a lock on the |
534 // structure. | 534 // structure. |
535 long JNIHandleBlock::memory_usage() const { | 535 long JNIHandleBlock::memory_usage() const { |
536 return length() * sizeof(JNIHandleBlock); | 536 return length() * sizeof(JNIHandleBlock); |
537 } | 537 } |
538 | 538 |