mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 18:00:15 +01:00
py/gc: Make gc_dump_info/gc_dump_alloc_table take a printer as argument.
So that callers can redirect the output if needed. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -81,10 +81,10 @@ mp_obj_t mp_micropython_mem_info(size_t n_args, const mp_obj_t *args) {
|
||||
mp_printf(&mp_plat_print, "stack: " UINT_FMT "\n", mp_stack_usage());
|
||||
#endif
|
||||
#if MICROPY_ENABLE_GC
|
||||
gc_dump_info();
|
||||
gc_dump_info(&mp_plat_print);
|
||||
if (n_args == 1) {
|
||||
// arg given means dump gc allocation table
|
||||
gc_dump_alloc_table();
|
||||
gc_dump_alloc_table(&mp_plat_print);
|
||||
}
|
||||
#else
|
||||
(void)n_args;
|
||||
|
||||
Reference in New Issue
Block a user