<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/gc.h, branch 0.8.4</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.8.4</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.8.4'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-11-29T22:11:32+00:00</updated>
<entry>
<title>Revert "py: Add ability to manually mark blocks during collect."</title>
<updated>2016-11-29T22:11:32+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott.shawcroft@gmail.com</email>
</author>
<published>2016-11-29T22:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=05c14dfe7809d4ac17c1e18b6ade8786212fc79f'/>
<id>urn:sha1:05c14dfe7809d4ac17c1e18b6ade8786212fc79f</id>
<content type='text'>
This reverts commit 93218281588b42331d83e4aaa45ac1abe4af130b.
</content>
</entry>
<entry>
<title>py: Add ability to manually mark blocks during collect.</title>
<updated>2016-11-21T22:11:49+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott.shawcroft@gmail.com</email>
</author>
<published>2016-11-21T20:17:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93218281588b42331d83e4aaa45ac1abe4af130b'/>
<id>urn:sha1:93218281588b42331d83e4aaa45ac1abe4af130b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/gc: Calculate (and report) maximum contiguous free block size.</title>
<updated>2016-06-30T21:09:55+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-06-30T21:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=749cbaca7f5406e23bbf0009477c73e14fa8a9ff'/>
<id>urn:sha1:749cbaca7f5406e23bbf0009477c73e14fa8a9ff</id>
<content type='text'>
Just as maximum allocated block size, it's reported in allocation units
(not bytes).
</content>
</entry>
<entry>
<title>py/gc: Move away from using mp_uint_t, instead use uintptr_t and size_t.</title>
<updated>2015-11-29T14:25:04+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T13:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=94fe6e523d42ecc342c1f6a9734ed2edf232ddbd'/>
<id>urn:sha1:94fe6e523d42ecc342c1f6a9734ed2edf232ddbd</id>
<content type='text'>
The GC works with concrete pointers and so the types should reflect this.
</content>
</entry>
<entry>
<title>py: Clear finalizer flag when calling gc_free.</title>
<updated>2015-11-07T14:26:11+00:00</updated>
<author>
<name>Dave Hylands</name>
<email>dhylands@gmail.com</email>
</author>
<published>2015-11-06T22:32:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f3c0d1ea8fa21df3b2078c7189f2b26fe36da59'/>
<id>urn:sha1:7f3c0d1ea8fa21df3b2078c7189f2b26fe36da59</id>
<content type='text'>
Currently, the only place that clears the bit is in gc_collect.
So if a block with a finalizer is allocated, and subsequently
freed, and then the block is reallocated with no finalizer then
the bit remains set.

This could also be fixed by having gc_alloc clear the bit, but
I'm pretty sure that free is called way less than alloc, so doing
it in free is more efficient.
</content>
</entry>
<entry>
<title>py: Improve allocation policy of qstr data.</title>
<updated>2015-07-14T21:56:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-13T20:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ade9a052365247be5ed4ce8b53c2164a576a4a05'/>
<id>urn:sha1:ade9a052365247be5ed4ce8b53c2164a576a4a05</id>
<content type='text'>
Previous to this patch all interned strings lived in their own malloc'd
chunk.  On average this wastes N/2 bytes per interned string, where N is
the number-of-bytes for a quanta of the memory allocator (16 bytes on 32
bit archs).

With this patch interned strings are concatenated into the same malloc'd
chunk when possible.  Such chunks are enlarged inplace when possible,
and shrunk to fit when a new chunk is needed.

RAM savings with this patch are highly varied, but should always show an
improvement (unless only 3 or 4 strings are interned).  New version
typically uses about 70% of previous memory for the qstr data, and can
lead to savings of around 10% of total memory footprint of a running
script.

Costs about 120 bytes code size on Thumb2 archs (depends on how many
calls to gc_realloc are made).
</content>
</entry>
<entry>
<title>py: Put all global state together in state structures.</title>
<updated>2015-01-07T20:33:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T23:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=b4b10fd350852e321624d74983cca286091b55a1'/>
<id>urn:sha1:b4b10fd350852e321624d74983cca286091b55a1</id>
<content type='text'>
This patch consolidates all global variables in py/ core into one place,
in a global structure.  Root pointers are all located together to make
GC tracing easier and more efficient.
</content>
</entry>
<entry>
<title>py: Move to guarded includes, everywhere in py/ core.</title>
<updated>2015-01-01T20:32:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T20:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=51dfcb4bb7613ed164952712d9a5235a7b833cde'/>
<id>urn:sha1:51dfcb4bb7613ed164952712d9a5235a7b833cde</id>
<content type='text'>
Addresses issue #1022.
</content>
</entry>
<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>
</feed>
