<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/modgc.c, branch 5.0.0-beta.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0-beta.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0-beta.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-08-30T11:02:00+00:00</updated>
<entry>
<title>py: Change obsolete "///" comment formatting to normal comments.</title>
<updated>2017-08-30T11:02:00+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-08-30T11:02:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0102ee092b590be2736521ebf165c96bcf0bcbe6'/>
<id>urn:sha1:0102ee092b590be2736521ebf165c96bcf0bcbe6</id>
<content type='text'>
This comment style is no longer used because the docs are written by hand,
not generated.
</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>
<entry>
<title>all: Remove 'name' member from mp_obj_module_t struct.</title>
<updated>2016-09-21T14:23:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-09-21T00:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93c4a6a3f70e389b466fbc7a4f1ad2e1df87c93f'/>
<id>urn:sha1:93c4a6a3f70e389b466fbc7a4f1ad2e1df87c93f</id>
<content type='text'>
One can instead lookup __name__ in the modules dict to get the value.
</content>
</entry>
<entry>
<title>py/gc: Implement GC running by allocation threshold.</title>
<updated>2016-07-20T21:37:30+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-20T21:37:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=93e353e3844f7116088a1a105ba588cade0e6783'/>
<id>urn:sha1:93e353e3844f7116088a1a105ba588cade0e6783</id>
<content type='text'>
Currently, MicroPython runs GC when it could not allocate a block of memory,
which happens when heap is exhausted. However, that policy can't work well
with "inifinity" heaps, e.g. backed by a virtual memory - there will be a
lot of swap thrashing long before VM will be exhausted. Instead, in such
cases "allocation threshold" policy is used: a GC is run after some number of
allocations have been made. Details vary, for example, number or total amount
of allocations can be used, threshold may be self-adjusting based on GC
outcome, etc.

This change implements a simple variant of such policy for MicroPython. Amount
of allocated memory so far is used for threshold, to make it useful to typical
finite-size, and small, heaps as used with MicroPython ports. And such GC policy
is indeed useful for such types of heaps too, as it allows to better control
fragmentation. For example, if a threshold is set to half size of heap, then
for an application which usually makes big number of small allocations, that
will (try to) keep half of heap memory in a nice defragmented state for an
occasional large allocation.

For an application which doesn't exhibit such behavior, there won't be any
visible effects, except for GC running more frequently, which however may
affect performance. To address this, the GC threshold is configurable, and
by default is off so far. It's configured with gc.threshold(amount_in_bytes)
call (can be queries without an argument).
</content>
</entry>
<entry>
<title>py/modgc: Remove obsolete extern declaration.</title>
<updated>2015-12-17T13:20:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-12-17T13:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=02fa8dff859be40443f16baf9bc7431878f34ec1'/>
<id>urn:sha1:02fa8dff859be40443f16baf9bc7431878f34ec1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Add MP_ROM_* macros and mp_rom_* types and use them.</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:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cbf7674025814797f5c537d6d1c195efe58ccaaf'/>
<id>urn:sha1:cbf7674025814797f5c537d6d1c195efe58ccaaf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.</title>
<updated>2015-10-11T12:18:15+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-10-11T09:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1b586f3a734c27c78080fb2173bbde17168cb9e4'/>
<id>urn:sha1:1b586f3a734c27c78080fb2173bbde17168cb9e4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Put mp_sys_path, mp_sys_argv and gc_collected in mp_state_ctx_t.</title>
<updated>2015-02-07T17:24:10+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-07T17:24:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e1e359ff59d6bbf09441cc1f3965be63f1046182'/>
<id>urn:sha1:e1e359ff59d6bbf09441cc1f3965be63f1046182</id>
<content type='text'>
Without mp_sys_path and mp_sys_argv in the root pointer section of the
state, their memory was being incorrectly collected by GC.
</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>
</feed>
