Skip to content

Commit b76fd84

Browse files
committed
unix mem_info(): Dump GC info only if it's enabled.
1 parent 643284f commit b76fd84

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

unix/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ int usage(char **argv) {
250250

251251
mp_obj_t mem_info(void) {
252252
printf("mem: total=%d, current=%d, peak=%d\n", m_get_total_bytes_allocated(), m_get_current_bytes_allocated(), m_get_peak_bytes_allocated());
253+
#if MICROPY_ENABLE_GC
253254
gc_dump_info();
255+
#endif
254256
return mp_const_none;
255257
}
256258

0 commit comments

Comments
 (0)