diff --git a/py/gc.c b/py/gc.c index dcf07c6467e7..2c5d2d2c29e6 100644 --- a/py/gc.c +++ b/py/gc.c @@ -759,13 +759,10 @@ void gc_info(gc_info_t *info) { GC_EXIT(); } -// CIRCUITPY-CHANGE +// CIRCUITPY-CHANGE: C code may be used when the VM heap isn't active. This +// allows that code to test if it is. It can use the outer pool if needed. bool gc_alloc_possible(void) { - #if MICROPY_GC_SPLIT_HEAP - return MP_STATE_MEM(gc_last_free_area) != 0; - #else return MP_STATE_MEM(area).gc_pool_start != 0; - #endif } void *gc_alloc(size_t n_bytes, unsigned int alloc_flags) {