diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-26 22:55:59 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-26 22:55:59 +0000 |
commit | ce1162ab15e69c42157aea4ecc341cc5044e2477 (patch) | |
tree | 41cca7b2de6c4895c4690551eeb721d132c845ba /unix/gccollect.c | |
parent | 41eb6086b757a3ca1b2507a15a9ffcce2ad27d1f (diff) | |
download | micropython-ce1162ab15e69c42157aea4ecc341cc5044e2477.tar.gz micropython-ce1162ab15e69c42157aea4ecc341cc5044e2477.zip |
GC: Fix printf formats for debugging; add gc_dump_alloc_table.
Diffstat (limited to 'unix/gccollect.c')
-rw-r--r-- | unix/gccollect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/gccollect.c b/unix/gccollect.c index 60bc99323e..5370a641ce 100644 --- a/unix/gccollect.c +++ b/unix/gccollect.c @@ -54,11 +54,11 @@ void gc_collect(void) { // this traces .data and .bss sections extern char __bss_start, _end; //printf(".bss: %p-%p\n", &__bss_start, &_end); - gc_collect_root((void**)&__bss_start, ((uint32_t)&_end - (uint32_t)&__bss_start) / sizeof(uint32_t)); + gc_collect_root((void**)&__bss_start, ((machine_uint_t)&_end - (machine_uint_t)&__bss_start) / sizeof(machine_uint_t)); regs_t regs; gc_helper_get_regs(regs); // GC stack (and regs because we captured them) - gc_collect_root((void**)®s, ((uint32_t)stack_top - (uint32_t)®s) / sizeof(uint32_t)); + gc_collect_root((void**)®s, ((machine_uint_t)stack_top - (machine_uint_t)®s) / sizeof(machine_uint_t)); gc_collect_end(); //printf("-----\n"); |