<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/misc.h, branch master</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=master</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2018-07-11T20:45:30+00:00</updated>
<entry>
<title>WIP: after merge; before testing</title>
<updated>2018-07-11T20:45:30+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-07-11T20:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7c219600a246d8956d0b23ea3f5d125a820e6b6a'/>
<id>urn:sha1:7c219600a246d8956d0b23ea3f5d125a820e6b6a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/misc.h: Add MP_STATIC_ASSERT macro to do static assertions.</title>
<updated>2018-05-18T13:31:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-18T03:10:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=43d08d6dd6fab6c88eeb20663ab97d622c2ea915'/>
<id>urn:sha1:43d08d6dd6fab6c88eeb20663ab97d622c2ea915</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/misc.h: Remove unused count_lead_ones() inline function.</title>
<updated>2018-03-13T02:23:30+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-13T02:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d4b55eff44da38e51616124883508c0d6b6678d3'/>
<id>urn:sha1:d4b55eff44da38e51616124883508c0d6b6678d3</id>
<content type='text'>
This function was never used for unicode/utf8 handling code, or anything
else, so remove it to keep things clean.
</content>
</entry>
<entry>
<title>py/unicode: Clean up utf8 funcs and provide non-utf8 inline versions.</title>
<updated>2018-02-14T07:19:22+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-14T07:19:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=19aee9438a7a8cf8539536dab5147aedb6b16bb3'/>
<id>urn:sha1:19aee9438a7a8cf8539536dab5147aedb6b16bb3</id>
<content type='text'>
This patch provides inline versions of the utf8 helper functions for the
case when unicode is disabled (MICROPY_PY_BUILTINS_STR_UNICODE set to 0).
This saves code size.

The unichar_charlen function is also renamed to utf8_charlen to match the
other utf8 helper functions, and the signature of this function is adjusted
for consistency (const char* -&gt; const byte*, mp_uint_t -&gt; size_t).
</content>
</entry>
<entry>
<title>Introduce a long lived section of the heap.</title>
<updated>2018-01-24T18:33:46+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott.shawcroft@gmail.com</email>
</author>
<published>2018-01-24T00:22:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=416abe33ed44e44d8f75342731080217e123278b'/>
<id>urn:sha1:416abe33ed44e44d8f75342731080217e123278b</id>
<content type='text'>
This adapts the allocation process to start from either end of the heap
when searching for free space. The default behavior is identical to the
existing behavior where it starts with the lowest block and looks higher.
Now it can also look from the highest block and lower depending on the
long_lived parameter to gc_alloc. As the heap fills, the two sections may
overlap. When they overlap, a collect may be triggered in order to keep
the long lived section compact. However, free space is always eligable
for each type of allocation.

By starting from either of the end of the heap we have ability to separate
short lived objects from long lived ones. This separation reduces heap
fragmentation because long lived objects are easy to densely pack.

Most objects are short lived initially but may be made long lived when
they are referenced by a type or module. This involves copying the
memory and then letting the collect phase free the old portion.

QSTR pools and chunks are always long lived because they are never freed.

The reallocation, collection and free processes are largely unchanged. They
simply also maintain an index to the highest free block as well as the lowest.
These indices are used to speed up the allocation search until the next collect.

In practice, this change may slightly slow down import statements with the
benefit that memory is much less fragmented afterwards. For example, a test
import into a 20k heap that leaves ~6k free previously had the largest
continuous free space of ~400 bytes. After this change, the largest continuous
free space is over 3400 bytes.
</content>
</entry>
<entry>
<title>py/misc.h: Add m_new_obj_var_with_finaliser().</title>
<updated>2017-12-04T09:05:49+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-12-04T09:05:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=75d3c046dafa84dad51ed757f832c2dad2934bf9'/>
<id>urn:sha1:75d3c046dafa84dad51ed757f832c2dad2934bf9</id>
<content type='text'>
Similar to existing m_new_obj_with_finaliser().
</content>
</entry>
<entry>
<title>Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge</title>
<updated>2017-10-25T05:31:16+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott.shawcroft@gmail.com</email>
</author>
<published>2017-10-25T05:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=73c15dcf8b1b927757a595a867334b38355ddb8f'/>
<id>urn:sha1:73c15dcf8b1b927757a595a867334b38355ddb8f</id>
<content type='text'>
This is prep for merging in the NRF5 pull request.
</content>
</entry>
<entry>
<title>py: Make m_malloc_fail() have void return type, since it doesn't return.</title>
<updated>2017-08-31T07:00:14+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-08-31T07:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ca21aed0a11903db04fc96056f8a08e452aaf504'/>
<id>urn:sha1:ca21aed0a11903db04fc96056f8a08e452aaf504</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.</title>
<updated>2017-08-26T02:17:07+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2017-08-26T02:17:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ef61b5ecb59e9b4e37e3e3c023c62d583c23eb16'/>
<id>urn:sha1:ef61b5ecb59e9b4e37e3e3c023c62d583c23eb16</id>
<content type='text'>
cpx build compiles and loads and works in repl; test suite not run yet
esp8266 not tested yet
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
</feed>
