summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-13 00:16:38 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-05-13 00:16:38 +0300
commit68a7a92cecdf24ad869fbe06138bbdd669015db3 (patch)
treef16475fc9558932c47aab1ed0fe1d2b6493c933d
parent9a8751b006231bcc311c2d2c079f6cb7c8d2405e (diff)
downloadmicropython-68a7a92cecdf24ad869fbe06138bbdd669015db3.tar.gz
micropython-68a7a92cecdf24ad869fbe06138bbdd669015db3.zip
py/gc: gc_dump_alloc_table(): Dump heap offset instead of actual address.
Address printed was truncated anyway and in general confusing to outsider. A line which dumps it is still left in the source, commented, for peculiar cases when it may be needed (e.g. when running under debugger).
-rw-r--r--py/gc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/py/gc.c b/py/gc.c
index 0e1e4a7d32..a1ba45a2bf 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -693,11 +693,8 @@ void gc_dump_alloc_table(void) {
}
// print header for new line of blocks
// (the cast to uint32_t is for 16-bit ports)
- #if EXTENSIVE_HEAP_PROFILING
+ //mp_printf(&mp_plat_print, "\n%05x: ", (uint)(PTR_FROM_BLOCK(bl) & (uint32_t)0xfffff));
mp_printf(&mp_plat_print, "\n%05x: ", (uint)((bl * BYTES_PER_BLOCK) & (uint32_t)0xfffff));
- #else
- mp_printf(&mp_plat_print, "\n%05x: ", (uint)(PTR_FROM_BLOCK(bl) & (uint32_t)0xfffff));
- #endif
}
int c = ' ';
switch (ATB_GET_KIND(bl)) {