diff options
| author | robert-hh <robert@hammelrath.com> | 2023-01-12 10:39:27 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-01-16 12:09:20 +1100 |
| commit | e78e0b7418477af78284478c3e678db7bf2298cd (patch) | |
| tree | 8c83215ba8a9fe5df83a8efba152d4de506ea75c | |
| parent | 4eefe78e8ed409641f30ad6c0edca8ca07a8e934 (diff) | |
py/gc: Increase the address length in gc_dump_alloc_table().
Showing 8 digits instead of 5, supporting devices with more than 1 MByte of
RAM (which is common these days). The masking was never needed, and the
related commented-out line can go.
| -rw-r--r-- | py/gc.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1058,8 +1058,7 @@ void gc_dump_alloc_table(void) { } // print header for new line of blocks // (the cast to uint32_t is for 16-bit ports) - // mp_printf(&mp_plat_print, "\n%05x: ", (uint)(PTR_FROM_BLOCK(area, bl) & (uint32_t)0xfffff)); - mp_printf(&mp_plat_print, "\n%05x: ", (uint)((bl * BYTES_PER_BLOCK) & (uint32_t)0xfffff)); + mp_printf(&mp_plat_print, "\n%08x: ", (uint)(bl * BYTES_PER_BLOCK)); } int c = ' '; switch (ATB_GET_KIND(area, bl)) { |
