Skip to content

Commit 36371fe

Browse files
committed
fix compiling gc.c
1 parent 0c64275 commit 36371fe

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

py/gc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ void gc_add(void *start, void *end) {
252252
void gc_deinit(void) {
253253
// Run any finalisers before we stop using the heap.
254254
gc_sweep_all();
255-
256-
MP_STATE_MEM(area) = 0;
255+
MP_STATIC_ASSERT(!MICROPY_GC_SPLIT_HEAP);
256+
memset(&MP_STATE_MEM(area), 0, sizeof(MP_STATE_MEM(area)));
257257
}
258258

259259
void gc_lock(void) {
@@ -773,6 +773,7 @@ void *gc_alloc(size_t n_bytes, unsigned int alloc_flags) {
773773

774774
#if EXTENSIVE_HEAP_PROFILING
775775
gc_dump_alloc_table(&mp_plat_print);
776+
#endif
776777

777778
#if CIRCUITPY_MEMORYMONITOR
778779
memorymonitor_track_allocation(end_block - start_block + 1);

0 commit comments

Comments
 (0)