diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-11 18:52:46 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-11 19:00:15 +0300 |
commit | 3d7f3f00e03ef165aebef68a5f9710631494654b (patch) | |
tree | f7080a1b9d5509ec80f1794b8dd5b3ed29c8bc73 /py/gc.c | |
parent | 80a8d473f606e08dd43808b826b8b236266751a0 (diff) |
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).
Diffstat (limited to 'py/gc.c')
-rw-r--r-- | py/gc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |