kopia lustrzana https://github.com/micropython/micropython
py: Make heap printing compatible with 16-bit word size.
rodzic
3f327cc4c6
commit
12ab9eda8d
5
py/gc.c
5
py/gc.c
|
@ -680,10 +680,11 @@ 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
|
||||
printf("\n%05x: ", (uint)(bl * BYTES_PER_BLOCK) & 0xfffff);
|
||||
printf("\n%05x: ", (uint)((bl * BYTES_PER_BLOCK) & (uint32_t)0xfffff));
|
||||
#else
|
||||
printf("\n%05x: ", (uint)PTR_FROM_BLOCK(bl) & 0xfffff);
|
||||
printf("\n%05x: ", (uint)(PTR_FROM_BLOCK(bl) & (uint32_t)0xfffff));
|
||||
#endif
|
||||
}
|
||||
int c = ' ';
|
||||
|
|
Ładowanie…
Reference in New Issue