1 parent 0c64275 commit 36371feCopy full SHA for 36371fe
1 file changed
py/gc.c
@@ -252,8 +252,8 @@ void gc_add(void *start, void *end) {
252
void gc_deinit(void) {
253
// Run any finalisers before we stop using the heap.
254
gc_sweep_all();
255
-
256
- MP_STATE_MEM(area) = 0;
+ MP_STATIC_ASSERT(!MICROPY_GC_SPLIT_HEAP);
+ memset(&MP_STATE_MEM(area), 0, sizeof(MP_STATE_MEM(area)));
257
}
258
259
void gc_lock(void) {
@@ -773,6 +773,7 @@ void *gc_alloc(size_t n_bytes, unsigned int alloc_flags) {
773
774
#if EXTENSIVE_HEAP_PROFILING
775
gc_dump_alloc_table(&mp_plat_print);
776
+ #endif
777
778
#if CIRCUITPY_MEMORYMONITOR
779
memorymonitor_track_allocation(end_block - start_block + 1);
0 commit comments