- Dec 18, 2015
-
-
Damien George authored
Ideally we'd use %zu for size_t args, but that's unlikely to be supported by all runtimes, and we would then need to implement it in mp_printf. So simplest and most portable option is to use %u and cast the argument to uint(=unsigned int). Note: reason for the change is that UINT_FMT can be %llu (size suitable for mp_uint_t) which is wider than size_t and prints incorrect results.
-
- Dec 17, 2015
-
-
Damien George authored
size_t is the correct type to use to count things related to the size of the address space. Using size_t (instead of mp_uint_t) is important for the efficiency of ports that configure mp_uint_t to larger than the machine word size.
-
Damien George authored
-
Damien George authored
The GC should search for pointers within the heap. This patch makes a difference when an object is larger than a pointer (eg 64-bit NaN boxing).
-
- Dec 02, 2015
-
-
Paul Sokolovsky authored
-
- Nov 29, 2015
-
-
Damien George authored
This allows the mp_obj_t type to be configured to something other than a pointer-sized primitive type. This patch also includes additional changes to allow the code to compile when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of mp_uint_t, and various casts.
-
Damien George authored
The GC works with concrete pointers and so the types should reflect this.
-
- Nov 07, 2015
-
-
Dave Hylands authored
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.
-
- Sep 04, 2015
-
-
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).
-
- Apr 16, 2015
-
-
Damien George authored
-
- Apr 03, 2015
-
-
Damien George authored
-
- Feb 07, 2015
-
-
Damien George authored
Without mp_sys_path and mp_sys_argv in the root pointer section of the state, their memory was being incorrectly collected by GC.
-
- Jan 12, 2015
-
-
Damien George authored
-
- Jan 11, 2015
-
-
Damien George authored
-
- Jan 08, 2015
-
-
stijn authored
GC for unix/windows builds doesn't make use of the bss section anymore, so we do not need the (sometimes complicated) build features and code related to it
-
- 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
-
Damien George authored
Addresses issue #1022.
-
- Nov 05, 2014
-
-
Damien George authored
-
- 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 24, 2014
-
-
Damien George authored
In unix port, mem_info(1) now prints pretty GC alloc table.
-
- Oct 23, 2014
-
-
Damien George authored
-
Damien George authored
-
- Oct 17, 2014
-
-
Damien George authored
-
- Oct 16, 2014
-
-
Damien George authored
-
- Oct 15, 2014
-
-
Damien George authored
Previously, a realloc to a smaller memory chunk size would not free the unused blocks in the tail of the chunk.
-
- Aug 28, 2014
-
-
Damien George authored
The heap allocation is now exactly as it was before the "faster gc alloc" patch, but it's still nearly as fast. It is fixed by being careful to always update the "last free block" pointer whenever the heap changes (eg free or realloc). Tested on all tests by enabling EXTENSIVE_HEAP_PROFILING in py/gc.c: old and new allocator have exactly the same behaviour, just the new one is much faster.
-
Damien George authored
Recent speed up of GC allocation made the GC have a fragmented heap. This patch restores "original fragmentation behaviour" whilst still retaining relatively fast allocation. This patch works because there is always going to be a single block allocated now and then, which advances the gc_last_free_atb_index pointer often enough so that the whole heap doesn't need scanning. Should address issue #836.
-
- Aug 22, 2014
-
-
Damien George authored
This simple patch gives a very significant speed up for memory allocation with the GC. Eg, on PYBv1.0: tests/basics/dict_del.py: 3.55 seconds -> 1.19 seconds tests/misc/rge_sm.py: 15.3 seconds -> 2.48 seconds
-
- Aug 08, 2014
-
-
Damien George authored
This was a nasty bug to track down. It only had consequences when the heap size was just the right size to expose the rounding error in the calculation of the finaliser table size. And, a script had to allocate a small (1 or 2 cell) object at the very end of the heap. And, this object must not have a finaliser. And, the initial state of the heap must have been all bits set to 1. All these conspire on the pyboard, but only if your run the script fresh (so unused memory is all 1's), and if your script allocates a lot of small objects (eg 2-char strings that are not interned).
-
- Jul 03, 2014
-
-
Damien George authored
See discussion in issue #50.
-
- Jul 01, 2014
-
-
Dave Hylands authored
Step 1 fixes #732
-
- Jun 21, 2014
-
-
Paul Sokolovsky authored
It defines types used by all other headers. Fixes #691.
-
- Jun 18, 2014
- Jun 16, 2014
-
-
stijn authored
Add more DEBUG_printf statements to trace gc behaviour
-
- Jun 13, 2014
-
-
Damien George authored
-
stijn authored
void* is of unknown size
-
- Jun 05, 2014
-
-
Paul Sokolovsky authored
-