1. 25 Apr, 2014 1 commit
    • 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
  2. 20 Apr, 2014 4 commits
  3. 09 Apr, 2014 1 commit
  4. 08 Apr, 2014 1 commit
  5. 05 Apr, 2014 2 commits
  6. 03 Apr, 2014 1 commit
  7. 02 Apr, 2014 2 commits
  8. 17 Mar, 2014 1 commit
    • xbe's avatar
      py: Clean up includes. · efe34223
      xbe authored
      Remove unnecessary includes. Add includes that improve portability.
      efe34223
  9. 12 Mar, 2014 2 commits
  10. 07 Mar, 2014 1 commit
  11. 06 Mar, 2014 2 commits
  12. 05 Mar, 2014 1 commit
  13. 26 Feb, 2014 2 commits
  14. 16 Feb, 2014 1 commit
  15. 12 Feb, 2014 1 commit
  16. 11 Feb, 2014 3 commits
  17. 24 Jan, 2014 2 commits
  18. 12 Jan, 2014 1 commit
  19. 07 Jan, 2014 2 commits
  20. 21 Dec, 2013 1 commit
    • Damien's avatar
      Change object representation from 1 big union to individual structs. · d99b0528
      Damien authored
      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).
      d99b0528
  21. 23 Oct, 2013 2 commits
  22. 22 Oct, 2013 3 commits
  23. 21 Oct, 2013 1 commit