summaryrefslogtreecommitdiffstatshomepage
path: root/py/gc.c
Commit message (Collapse)AuthorAge
* Rename machine_(u)int_t to mp_(u)int_t.Damien George2014-07-03
| | | | See discussion in issue #50.
* Try not to cause a MemoryError when raising an exception during nterrupt ↵Dave Hylands2014-06-30
| | | | | | handling. Step 1 fixes #732
* py: Include mpconfig.h before all other includes.Paul Sokolovsky2014-06-21
| | | | | | It defines types used by all other headers. Fixes #691.
* gc: Turn off debugging info againstijn2014-06-18
|
* gc: Keep debug statements at beginning of scope where possiblestijn2014-06-18
|
* gc: More verbose debuggingstijn2014-06-16
| | | | Add more DEBUG_printf statements to trace gc behaviour
* py, gc: Revert ret_ptr to void*, casting to byte* for memset.Damien George2014-06-13
|
* gc: Use byte* pointers instead of void* for pointer arithmeticstijn2014-06-13
| | | | void* is of unknown size
* modgc: Implement return value for gc.collect(), enable on Unix.Paul Sokolovsky2014-06-05
|
* py: Compress a little the bytecode emitter structure.Damien George2014-05-10
|
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
* py, gc: Only zero out the extra bytes at the end of the heap chunk.Damien George2014-04-26
| | | | | This is a small optimisation to zero out only the additional bytes that the caller did not ask for.
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-04-25
|\
| * py, gc: Fix old gc_realloc for case when NULL is passed in as ptr.Damien George2014-04-25
| |
* | py, gc: Zero out newly allocated blocks in the GC.Damien George2014-04-25
|/ | | | | | | | | | | | | | | | | | | | | | | | Also add some more debugging output to gc_dump_alloc_table(). Now that newly allocated heap is always zero'd, maybe we just make this a policy for the uPy API to keep it simple (ie any new implementation of memory allocation must zero all allocations). This follows the D language philosophy. Before this patch, a previously used memory block which had pointers in it may still retain those pointers if the new user of that block does not actually use the entire block. Eg, if I want 5 blocks worth of heap, I actually get 8 (round up to nearest 4). Then I never use the last 3, so they keep their old values, which may be pointers pointing to the heap, hence preventing GC. In rare (or maybe not that rare) cases, this leads to long, unintentional "linked lists" within the GC'd heap, filling it up completely. It's pretty rare, because you have to reuse exactly that memory which is part of this "linked list", and reuse it in just the right way. This should fix issue #522, and might have something to do with issue #510.
* gc: gc_realloc(): Fix byte-to-block calculation.Paul Sokolovsky2014-04-20
|
* py, gc: Further simplify coding-style of gc_realloc.Damien George2014-04-20
| | | | No logic changes, just coding style to make it easy to read.
* gc: "new" gc_realloc: Rewrite in plain C, fixing bunch of bugs.Paul Sokolovsky2014-04-20
| | | | | | There were typos, various rounding errors trying to do concurrent counting in bytes vs blocks, complex conditional paths, superfluous variables, etc., etc., all leading to obscure segfaults.
* gc: Recover simple gc_realloc implementation, make easier to switch between.Paul Sokolovsky2014-04-20
|
* gc.c: Remove superfluous typedef (bute defined in misc.h).Paul Sokolovsky2014-04-09
|
* py: Improve GC locking/unlocking, and make it part of the API.Damien George2014-04-08
|
* Improve GC finalisation code; add option to disable it.Damien George2014-04-05
|
* Merge pull request #425 from iabdalkader/delDamien George2014-04-05
|\ | | | | Implement del
| * Move del to localsmux2014-04-05
| |
| * Implement delmux2014-04-03
| |
* | gc: Uses uint defined in misc.h.Paul Sokolovsky2014-04-02
|/
* py: Fix up so that it can compile without float.Damien George2014-04-02
|
* py: Clean up includes.xbe2014-03-17
| | | | Remove unnecessary includes. Add includes that improve portability.
* py: Cosmetic changes.Damien George2014-03-12
|
* Fix reallocmux2014-03-12
|
* py: Revert to old gc_realloc for now.Damien George2014-03-07
|
* py: Add comments to new gc_realloc, it has some bugs.Damien George2014-03-06
|
* py: Small cosmetic changes to gc_realloc.Damien George2014-03-06
|
* Fix gc_realloc to expand in placemux2014-03-05
| | | | * Issue #322
* GC: Fix printf formats for debugging; add gc_dump_alloc_table.Damien George2014-02-26
|
* py: Remove more var arg names fro macros with var args.Damien George2014-02-26
|
* Make DEBUG_printf() a proper function, implementation is port-dependent.Paul Sokolovsky2014-02-16
| | | | | In particular, unix outputs to stderr, to allow to run testsuite against micropython built with debug output (by redirecting stderr to /dev/null).
* Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.Paul Sokolovsky2014-02-12
|
* More GC debugging improvements.Paul Sokolovsky2014-02-11
|
* gc: Don't segfault if gc_realloc() fails.Paul Sokolovsky2014-02-11
|
* gc: Make debug output configurable, revamp test function.Paul Sokolovsky2014-02-11
| | | | | Test function needs to be called by something else. Test heap size reduced so its dump fits on a screenful of a typical terminal.
* Revert "Move gc_collect to py/gc.c"Damien George2014-01-24
| | | | This reverts commit a215b09c0dc29b82161092e92ea2e5e004d79468.
* Move gc_collect to py/gc.cmux2014-01-24
| | | | | | * Move gc_collect from main to py/gc.c * Define GC's memory boundaries in linker script * Issue #220
* Move BITS_PER_BYTE, BITS_PER_WORD to mpconfig.h for reuse.Paul Sokolovsky2014-01-12
|
* Factor and simplify Makefile's and mpconfig, part 2.Damien George2014-01-07
|
* Change object representation from 1 big union to individual structs.Damien2013-12-21
| | | | | | | | | | A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).
* Call gc_free in gc_realloc after allocating new block.Damien2013-10-23
|
* Fix func decls with no arguments: () -> (void).Damien2013-10-23
|
* gc: reserve first block; lexer: free vstr.Damien2013-10-22
|
* Add gc_free function to force a block to be freed.Damien2013-10-22
|