- Jul 09, 2018
-
-
Damien George authored
Fixes issue #3844.
-
- Dec 20, 2017
-
-
Damien George authored
m_malloc already checks for a failed allocation so there's no need to check for it in m_malloc0.
-
- Dec 07, 2017
-
-
Paul Sokolovsky authored
This is mostly a workaround for forceful rebuilding of mpy-cross on every codebase change. If this file has debug logging enabled (by patching), mpy-cross build failed.
-
Paul Sokolovsky authored
Error out if they're set incompatibly.
-
- Aug 31, 2017
-
-
Damien George authored
-
- Aug 15, 2017
-
-
Stefan Naumann authored
It enables all the DEBUG_printf outputs in the py/ source code.
-
- Jul 31, 2017
-
-
Alexander Steffen authored
There were several different spellings of MicroPython present in comments, when there should be only one.
-
- Aug 26, 2016
-
-
Damien George authored
There can be stray pointers in memory blocks that are not properly zero'd after allocation. This patch adds a new config option to always zero all allocated memory (via gc_alloc and gc_realloc) and hence help to eliminate stray pointers. See issue #2195.
-
- Feb 23, 2016
-
-
Damien George authored
-
- Jul 14, 2015
-
-
Damien George authored
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).
-
- Mar 03, 2015
-
-
Damien George authored
-
- Jan 07, 2015
-
-
Damien George authored
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.
-
- Jan 01, 2015
-
-
Damien George authored
Addresses issue #1022.
-
- Oct 31, 2014
-
-
Damien George authored
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.
-
- Oct 23, 2014
-
-
Damien George authored
-
- Sep 25, 2014
-
-
Damien George authored
It seems most sensible to use size_t for measuring "number of bytes" in malloc and vstr functions (since that's what size_t is for). We don't use mp_uint_t because malloc and vstr are not Micro Python specific.
-
- Jun 21, 2014
-
-
Paul Sokolovsky authored
It defines types used by all other headers. Fixes #691.
-
- May 03, 2014
-
-
Damien George authored
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/.
-
- Apr 26, 2014
-
-
Damien George authored
This is a small optimisation to zero out only the additional bytes that the caller did not ask for.
-
- Apr 25, 2014
-
-
Damien George authored
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.
-
- Apr 10, 2014
-
-
Damien George authored
Previously, a failed malloc/realloc would throw an exception, which was not caught. I think it's better to keep the parser free from NLR (exception throwing), hence this patch.
-
Damien George authored
-
- Apr 05, 2014
-
-
Damien George authored
-
- Apr 04, 2014
-
-
Damien George authored
A malloc/realloc fail now throws MemoryError.
-
- Apr 03, 2014
-
-
mux authored
-
- Apr 02, 2014
-
-
Damien George authored
-
- Mar 17, 2014
-
-
xbe authored
Remove unnecessary includes. Add includes that improve portability.
-
- Feb 26, 2014
-
-
Damien George authored
-
- Feb 16, 2014
-
-
Paul Sokolovsky authored
In particular, unix outputs to stderr, to allow to run testsuite against micropython built with debug output (by redirecting stderr to /dev/null).
-
- Feb 12, 2014
-
-
Paul Sokolovsky authored
-
- Feb 11, 2014
-
-
Paul Sokolovsky authored
-
- Feb 10, 2014
-
-
Paul Sokolovsky authored
If there's malloc and memset, then there's no need for calloc, especially if we need to implement it ourselves.
-
- Jan 30, 2014
-
-
Paul Sokolovsky authored
To alloc complete memory alloc flow tracing.
-
- Jan 29, 2014
-
-
Damien George authored
-
- Jan 03, 2014
-
-
Paul Sokolovsky authored
mpconfig.h will automatically pull mpconfigport.h.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This is just max value of current_bytes_allocated seen.
-
Paul Sokolovsky authored
Unlike total_bytes_allocated, this tracks m_free()'s too.
-
Paul Sokolovsky authored
-
- Dec 29, 2013
-
-
Damien authored
-