Skip to content
Snippets Groups Projects
  1. Jul 09, 2018
  2. Dec 20, 2017
  3. Dec 07, 2017
  4. Aug 31, 2017
  5. Aug 15, 2017
  6. Jul 31, 2017
  7. Aug 26, 2016
  8. Feb 23, 2016
  9. Jul 14, 2015
    • Damien George's avatar
      py: Improve allocation policy of qstr data. · ade9a052
      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).
      ade9a052
  10. Mar 03, 2015
  11. Jan 07, 2015
  12. Jan 01, 2015
  13. Oct 31, 2014
  14. Oct 23, 2014
  15. Sep 25, 2014
  16. Jun 21, 2014
  17. May 03, 2014
    • Damien George's avatar
      Add license header to (almost) all files. · 04b9147e
      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/.
      04b9147e
  18. Apr 26, 2014
  19. Apr 25, 2014
    • Damien George's avatar
      py, gc: Zero out newly allocated blocks in the GC. · daab651c
      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.
      daab651c
  20. Apr 10, 2014
  21. Apr 05, 2014
  22. Apr 04, 2014
  23. Apr 03, 2014
  24. Apr 02, 2014
  25. Mar 17, 2014
    • xbe's avatar
      py: Clean up includes. · efe34223
      xbe authored
      Remove unnecessary includes. Add includes that improve portability.
      efe34223
  26. Feb 26, 2014
  27. Feb 16, 2014
  28. Feb 12, 2014
  29. Feb 11, 2014
  30. Feb 10, 2014
    • Paul Sokolovsky's avatar
      Get rid of calloc(). · 58ff93bc
      Paul Sokolovsky authored
      If there's malloc and memset, then there's no need for calloc, especially if
      we need to implement it ourselves.
      58ff93bc
  31. Jan 30, 2014
  32. Jan 29, 2014
  33. Jan 03, 2014
  34. Dec 29, 2013
Loading