never trigger a GC due to an immortal allocation

This commit is contained in:
Joel Dice 2008-11-23 11:48:39 -07:00
parent fb9b2bf173
commit 207f093464

View File

@ -2053,11 +2053,9 @@ allocate3(Thread* t, Allocator* allocator, Machine::AllocationType type,
ENTER(t, Thread::IdleState);
}
if (type == Machine::FixedAllocation) {
if (t->m->fixedFootprint + sizeInBytes > FixedFootprintThresholdInBytes) {
t->heap = 0;
}
} else if (t->heapIndex + ceiling(sizeInBytes, BytesPerWord)
switch (type) {
case Machine::MovableAllocation:
if (t->heapIndex + ceiling(sizeInBytes, BytesPerWord)
> ThreadHeapSizeInWords)
{
t->heap = 0;
@ -2071,6 +2069,17 @@ allocate3(Thread* t, Allocator* allocator, Machine::AllocationType type,
}
}
}
break;
case Machine::FixedAllocation:
if (t->m->fixedFootprint + sizeInBytes > FixedFootprintThresholdInBytes) {
t->heap = 0;
}
break;
case Machine::ImmortalAllocation:
break;
}
if (t->heap == 0) {
// fprintf(stderr, "gc");