Skip to content

Commit e78e0b7

Browse files
robert-hhdpgeorge
authored andcommitted
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.
1 parent 4eefe78 commit e78e0b7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

py/gc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,8 +1058,7 @@ void gc_dump_alloc_table(void) {
10581058
}
10591059
// print header for new line of blocks
10601060
// (the cast to uint32_t is for 16-bit ports)
1061-
// mp_printf(&mp_plat_print, "\n%05x: ", (uint)(PTR_FROM_BLOCK(area, bl) & (uint32_t)0xfffff));
1062-
mp_printf(&mp_plat_print, "\n%05x: ", (uint)((bl * BYTES_PER_BLOCK) & (uint32_t)0xfffff));
1061+
mp_printf(&mp_plat_print, "\n%08x: ", (uint)(bl * BYTES_PER_BLOCK));
10631062
}
10641063
int c = ' ';
10651064
switch (ATB_GET_KIND(area, bl)) {

0 commit comments

Comments
 (0)