Me again. I am trying to track down why, when I use the external timer from my code
https://github.com/micropython/micropython/pull/1453
It seems the garbage collector never actually has anything freeable.
For example, I have enabled the gc debugging. Once the string is printed I would assume it would be collectable.
I may be on the wrong track here. Once I come out of the uart loop and back to the system scheduled loop
maybe there is some other issue with the stack? It seems the garbage collector should just run through the object list that has been built on the pre-allocated heap.
The garbage collect does not seem to have any knowledge of the stack in the existing thread.
(ps. I bought a micropython board to contribute but I really want to get the ESP board going well).
gc_alloc(16 bytes -> 1 blocks)
gc_alloc(3fff4310)
gc_alloc(18 bytes -> 2 blocks)
gc_alloc(3fff4450)
b'HTTP/1.0 200 OK\r\n'
gc_alloc(16 bytes -> 1 blocks)
gc_alloc(3fff4350)
gc_alloc(146 bytes -> 10 blocks)
gc_alloc(3fff47c0)
b'Date: Mon, 07 Sep 2015 11:42:17 GMT\r\nServer: WSGIServer/0.1 Python/2.7.3\r\nContent-type: text/html\r\nContent-Length: 24\r\n\r\n<html>Hello world</html>'
disconnected
gc_alloc(40 bytes -> 3 blocks)
gc_alloc(3fff4640)
gc_alloc(28 bytes -> 2 blocks)
gc_alloc(3fff4600)
gc_alloc(32 bytes -> 2 blocks)
gc_alloc(3fff4670)
gc_alloc(16 bytes -> 1 blocks)
gc_alloc(3fff4370)
gc_sweep(3fff4310)
gc_sweep(3fff4350)
gc_sweep(3fff4370)
gc_sweep(3fff4420)
gc_sweep(3fff5600)
gc_sweep(3fff5610)
gc_sweep(3fff5620)
gc_sweep(3fff5630)
gc_sweep(3fff5640)
gc_sweep(3fff5650)
gc_sweep(3fff5660)
gc_sweep(3fff5670)
gc_sweep(3fff5680)
gc_sweep(3fff5690)
GC: total: 16128, used: 2224, free: 13904
No. of 1-blocks: 27, 2-blocks: 13, max blk sz: 11
connected