py/gc: gc_dump_alloc_table(): Show byte/str and (byte)array objects.
These are typical consumers of large chunks of memory, so it's useful to see at least their number (how much memory isn't clearly shown, as the data for these objects is allocated elsewhere).
This commit is contained in:
parent
80a8d473f6
commit
3d7f3f00e0
2
py/gc.c
2
py/gc.c
@ -734,6 +734,8 @@ void gc_dump_alloc_table(void) {
|
||||
if (*ptr == &mp_type_tuple) { c = 'T'; }
|
||||
else if (*ptr == &mp_type_list) { c = 'L'; }
|
||||
else if (*ptr == &mp_type_dict) { c = 'D'; }
|
||||
else if (*ptr == &mp_type_str || *ptr == &mp_type_bytes) { c = 'S'; }
|
||||
else if (*ptr == &mp_type_bytearray || *ptr == &mp_type_array) { c = 'A'; }
|
||||
#if MICROPY_PY_BUILTINS_FLOAT
|
||||
else if (*ptr == &mp_type_float) { c = 'F'; }
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user