From b76fd842f0299a1b5a937cb3f16bc11ccb723bb8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 20 Apr 2014 22:10:27 +0300 Subject: [PATCH] unix mem_info(): Dump GC info only if it's enabled. --- unix/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unix/main.c b/unix/main.c index 940fe48c14..e4536f381c 100644 --- a/unix/main.c +++ b/unix/main.c @@ -250,7 +250,9 @@ int usage(char **argv) { mp_obj_t mem_info(void) { printf("mem: total=%d, current=%d, peak=%d\n", m_get_total_bytes_allocated(), m_get_current_bytes_allocated(), m_get_peak_bytes_allocated()); +#if MICROPY_ENABLE_GC gc_dump_info(); +#endif return mp_const_none; }