Allow globals in reclaimed bluetooth memory (#2455)

This commit is contained in:
Michał Moskal
2019-10-02 07:37:38 +02:00
committed by Peli de Halleux
parent 97d7c679d0
commit 65e2cf18bf
2 changed files with 13 additions and 0 deletions

View File

@ -28,6 +28,9 @@ MicroBitEvent lastEvent;
void platform_init() {
microbit_seed_random();
seedRandom(microbit_random(0x7fffffff));
}
void initMicrobitGC() {
if (device_heap_size(1) > NON_GC_HEAP_RESERVATION + 4)
gcPreAllocateBlock(device_heap_size(1) - NON_GC_HEAP_RESERVATION);
}