mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
force a GC in allocate3 if the heap limit has been exceeded
Otherwise, we'll throw an OOME even though there may be enough unreachable objects eligible for collection to get back below the limit.
This commit is contained in:
parent
3db9e73aa1
commit
23bb2e8743
@ -3519,7 +3519,7 @@ allocate3(Thread* t, Allocator* allocator, Machine::AllocationType type,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->heap == 0) {
|
if (t->heap == 0 or t->m->heap->limitExceeded()) {
|
||||||
// fprintf(stderr, "gc");
|
// fprintf(stderr, "gc");
|
||||||
// vmPrintTrace(t);
|
// vmPrintTrace(t);
|
||||||
collect(t, Heap::MinorCollection);
|
collect(t, Heap::MinorCollection);
|
||||||
|
Loading…
Reference in New Issue
Block a user