equal
deleted
inserted
replaced
147 int new_value = Atomic::add(&_refcount, 1); |
147 int new_value = Atomic::add(&_refcount, 1); |
148 assert(new_value >= 1, "negative refcount %d", new_value - 1); |
148 assert(new_value >= 1, "negative refcount %d", new_value - 1); |
149 } |
149 } |
150 |
150 |
151 bool OopStorage::ActiveArray::decrement_refcount() const { |
151 bool OopStorage::ActiveArray::decrement_refcount() const { |
152 int new_value = Atomic::sub(1, &_refcount); |
152 int new_value = Atomic::sub(&_refcount, 1); |
153 assert(new_value >= 0, "negative refcount %d", new_value); |
153 assert(new_value >= 0, "negative refcount %d", new_value); |
154 return new_value == 0; |
154 return new_value == 0; |
155 } |
155 } |
156 |
156 |
157 bool OopStorage::ActiveArray::push(Block* block) { |
157 bool OopStorage::ActiveArray::push(Block* block) { |
722 releasing |= entry_bitmask; |
722 releasing |= entry_bitmask; |
723 ++count; |
723 ++count; |
724 } |
724 } |
725 // Release the contiguous entries that are in block. |
725 // Release the contiguous entries that are in block. |
726 block->release_entries(releasing, this); |
726 block->release_entries(releasing, this); |
727 Atomic::sub(count, &_allocation_count); |
727 Atomic::sub(&_allocation_count, count); |
728 } |
728 } |
729 } |
729 } |
730 |
730 |
731 const size_t initial_active_array_size = 8; |
731 const size_t initial_active_array_size = 8; |
732 |
732 |