Page 1 of 1
meaning for GC report number
Posted: Thu Mar 14, 2019 7:58 pm
by wghe
Hi
Could anyone please to explain following GC number from machine.info()?
GC:
102784 total
2112 : 100672
1=56 2=23 m=8
Thanks in advance!
Regards,
WG
Re: meaning for GC report number
Posted: Thu Mar 14, 2019 9:11 pm
by dhylands
102784 is the total number of bytes in the heap
2112 is the number of bytes which are currently in use in the heap
100672 is the number of free bytes in the heap.
1=56 means that there are 56 heap allocations which take up a single block.
2=23 means that there are 23 heap allocations which take up 2 blocks
m=8 means that the largest allocated object in the heap is 8 blocks
On the pyboard, a block is 16 bytes.
Re: meaning for GC report number
Posted: Thu Mar 14, 2019 9:44 pm
by wghe
Hi Dave,
Very clear and got it!
Best regards,
WG
Re: meaning for GC report number
Posted: Sat Mar 16, 2019 7:41 am
by pythoncoder
There is also micropython.mem_info() which is more descriptive. An optional 1 arg provides a memory map.