We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03b077d commit 30d57b1Copy full SHA for 30d57b1
py/gc.c
@@ -759,13 +759,10 @@ void gc_info(gc_info_t *info) {
759
GC_EXIT();
760
}
761
762
-// CIRCUITPY-CHANGE
+// CIRCUITPY-CHANGE: C code may be used when the VM heap isn't active. This
763
+// allows that code to test if it is. It can use the outer pool if needed.
764
bool gc_alloc_possible(void) {
- #if MICROPY_GC_SPLIT_HEAP
765
- return MP_STATE_MEM(gc_last_free_area) != 0;
766
- #else
767
return MP_STATE_MEM(area).gc_pool_start != 0;
768
- #endif
769
770
771
void *gc_alloc(size_t n_bytes, unsigned int alloc_flags) {
0 commit comments