Fix GC heap reclamation (#2528)
This commit is contained in:
committed by
Peli de Halleux
parent
7ff14ccd53
commit
412a71dee8
@ -31,6 +31,7 @@ void platform_init() {
|
||||
}
|
||||
|
||||
void initMicrobitGC() {
|
||||
uBit.init();
|
||||
if (device_heap_size(1) > NON_GC_HEAP_RESERVATION + 4)
|
||||
gcPreAllocateBlock(device_heap_size(1) - NON_GC_HEAP_RESERVATION);
|
||||
}
|
||||
@ -43,9 +44,6 @@ struct FreeList {
|
||||
};
|
||||
|
||||
static void initCodal() {
|
||||
|
||||
uBit.init();
|
||||
|
||||
// repeat error 4 times and restart as needed
|
||||
microbit_panic_timeout(4);
|
||||
}
|
||||
|
Reference in New Issue
Block a user