mirror of
https://github.com/corda/corda.git
synced 2025-01-27 14:49:35 +00:00
use ACQUIRE_RAW instead of ACQUIRE in set(), since it will only block for a bounded interval; rename some Heap methods
This commit is contained in:
parent
1d02290ed1
commit
bb2494be83
@ -22,8 +22,8 @@ class Heap {
|
||||
|
||||
virtual ~Heap() { }
|
||||
virtual void collect(CollectionType type, Iterator* it) = 0;
|
||||
virtual bool isTenured(void** p) = 0;
|
||||
virtual void markTenured(void** p);
|
||||
virtual bool needsMark(void** p) = 0;
|
||||
virtual void mark(void** p);
|
||||
};
|
||||
|
||||
#endif//HEAP_H
|
||||
|
@ -356,9 +356,9 @@ inline void
|
||||
set(Thread* t, object& target, object value)
|
||||
{
|
||||
target = value;
|
||||
if (t->vm->heap->isTenured(&target)) {
|
||||
ACQUIRE(t, t->vm->heapLock);
|
||||
t->vm->heap->markTenured(&target);
|
||||
if (t->vm->heap->needsMark(&target)) {
|
||||
ACQUIRE_RAW(t, t->vm->heapLock);
|
||||
t->vm->heap->mark(&target);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user