Skip to content
Snippets Groups Projects
Commit 12ab9eda authored by Damien George's avatar Damien George
Browse files

py: Make heap printing compatible with 16-bit word size.

parent 3f327cc4
No related branches found
No related tags found
No related merge requests found
...@@ -680,10 +680,11 @@ void gc_dump_alloc_table(void) { ...@@ -680,10 +680,11 @@ void gc_dump_alloc_table(void) {
} }
} }
// print header for new line of blocks // print header for new line of blocks
// (the cast to uint32_t is for 16-bit ports)
#if EXTENSIVE_HEAP_PROFILING #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 #else
printf("\n%05x: ", (uint)PTR_FROM_BLOCK(bl) & 0xfffff); printf("\n%05x: ", (uint)(PTR_FROM_BLOCK(bl) & (uint32_t)0xfffff));
#endif #endif
} }
int c = ' '; int c = ' ';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment