<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/gc.c, branch v1.3.6</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.3.6</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.3.6'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2014-10-31T21:30:46+00:00</updated>
<entry>
<title>py: Make gc.enable/disable just control auto-GC; alloc is still allowed.</title>
<updated>2014-10-31T21:30:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-31T21:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=109c1de015eeee385020233e2f8cc6f921149103'/>
<id>urn:sha1:109c1de015eeee385020233e2f8cc6f921149103</id>
<content type='text'>
gc.enable/disable are now the same as CPython: they just control whether
automatic garbage collection is enabled or not.  If disabled, you can
still allocate heap memory, and initiate a manual collection.
</content>
</entry>
<entry>
<title>py: Improve memory usage debugging; better GC AT dumping.</title>
<updated>2014-10-24T22:12:25+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-24T22:12:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0b13f3e026c842facf65743450246b15a8c2e064'/>
<id>urn:sha1:0b13f3e026c842facf65743450246b15a8c2e064</id>
<content type='text'>
In unix port, mem_info(1) now prints pretty GC alloc table.
</content>
</entry>
<entry>
<title>py: Properly free string parse-node; add assertion to gc_free.</title>
<updated>2014-10-23T13:13:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-23T13:13:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e7bb0443cda9bfb88791c3a99bf0331217390eb4'/>
<id>urn:sha1:e7bb0443cda9bfb88791c3a99bf0331217390eb4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Clean up edge cases of malloc/realloc/free.</title>
<updated>2014-10-23T11:02:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-23T11:02:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=37378f8a9d2b358fdde0f3451d816b7f506846cc'/>
<id>urn:sha1:37378f8a9d2b358fdde0f3451d816b7f506846cc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Add more debug printing code in gc_dump_alloc_table.</title>
<updated>2014-10-17T14:12:57+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-17T14:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c30595eb1b8245da4ce1b9e9c32cb238bcf899de'/>
<id>urn:sha1:c30595eb1b8245da4ce1b9e9c32cb238bcf899de</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Take gc_pool_start out of bss section, to reclaim 1st block of heap.</title>
<updated>2014-10-16T20:50:39+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-16T20:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=37ada236b32e04338d24cb0e8a952af6b6bde55d'/>
<id>urn:sha1:37ada236b32e04338d24cb0e8a952af6b6bde55d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Fix GC realloc issue, where memory chunks were never shrunk.</title>
<updated>2014-10-15T18:24:47+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-10-15T18:24:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9b0b373e5e400b5ddb88928d169a64502c880888'/>
<id>urn:sha1:9b0b373e5e400b5ddb88928d169a64502c880888</id>
<content type='text'>
Previously, a realloc to a smaller memory chunk size would not free the
unused blocks in the tail of the chunk.
</content>
</entry>
<entry>
<title>py, gc: Further reduce heap fragmentation with new, faster gc alloc.</title>
<updated>2014-08-28T22:06:38+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-08-28T22:06:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=516b09efc3e5d2d88457a0300b65497a9bc39624'/>
<id>urn:sha1:516b09efc3e5d2d88457a0300b65497a9bc39624</id>
<content type='text'>
The heap allocation is now exactly as it was before the "faster gc
alloc" patch, but it's still nearly as fast.  It is fixed by being
careful to always update the "last free block" pointer whenever the heap
changes (eg free or realloc).

Tested on all tests by enabling EXTENSIVE_HEAP_PROFILING in py/gc.c:
old and new allocator have exactly the same behaviour, just the new one
is much faster.
</content>
</entry>
<entry>
<title>py: Reduce fragmentation of GC heap.</title>
<updated>2014-08-28T09:18:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-08-28T09:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b796e3d848b30346c11d173f39c06df88c646e2f'/>
<id>urn:sha1:b796e3d848b30346c11d173f39c06df88c646e2f</id>
<content type='text'>
Recent speed up of GC allocation made the GC have a fragmented heap.
This patch restores "original fragmentation behaviour" whilst still
retaining relatively fast allocation.  This patch works because there is
always going to be a single block allocated now and then, which advances
the gc_last_free_atb_index pointer often enough so that the whole heap
doesn't need scanning.

Should address issue #836.
</content>
</entry>
<entry>
<title>py: Speed up GC allocation.</title>
<updated>2014-08-22T17:17:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-08-22T17:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d5e7f6e37edc2fecbc0b3ceb19df425bafd45c90'/>
<id>urn:sha1:d5e7f6e37edc2fecbc0b3ceb19df425bafd45c90</id>
<content type='text'>
This simple patch gives a very significant speed up for memory allocation
with the GC.

Eg, on PYBv1.0:
tests/basics/dict_del.py: 3.55 seconds -&gt; 1.19 seconds
tests/misc/rge_sm.py:     15.3 seconds -&gt; 2.48 seconds
</content>
</entry>
</feed>
