Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
  • blm_dev_chan
  • release/1.4.0 protected
  • widgets_draw
  • return_of_melodic_demo
  • task_cleanup
  • mixer2
  • dx/fb-save-restore
  • dx/dldldld
  • fpletz/flake
  • dx/jacksense-headset-mic-only
  • release/1.3.0 protected
  • fil3s-limit-filesize
  • allow-reloading-sunmenu
  • wifi-json-error-handling
  • app_text_viewer
  • shoegaze-fps
  • media_has_video_has_audio
  • fil3s-media
  • more-accurate-battery
  • v1.4.0
  • v1.3.0
  • v1.2.0
  • v1.2.0+rc1
  • v1.1.1
  • v1.1.0
  • v1.1.0+rc1
  • v1.0.0
  • v1.0.0+rc6
  • v1.0.0+rc5
  • v1.0.0+rc4
  • v1.0.0+rc3
  • v1.0.0+rc2
  • v1.0.0+rc1
34 results

mpconfig.h

Blame
    • Angus Gratton's avatar
      29d5f767
      py/gc: Add new MICROPY_GC_SPLIT_HEAP_AUTO "auto grow heap" mode. · 29d5f767
      Angus Gratton authored and moon2's avatar moon2 committed
      
      When set, the split heap is automatically extended with new areas on
      demand, and shrunk if a heap area becomes empty during a GC pass or soft
      reset.
      
      To save code size the size allocation for a new heap block (including
      metadata) is estimated at 103% of the failed allocation, rather than
      working from the more complex algorithm in gc_try_add_heap(). This appears
      to work well except in the extreme limit case when almost all RAM is
      exhausted (~last few hundred bytes). However in this case some allocation
      is likely to fail soon anyhow.
      
      Currently there is no API to manually add a block of a given size to the
      heap, although that could easily be added if necessary.
      
      This work was funded through GitHub Sponsors.
      
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
      29d5f767
      History
      py/gc: Add new MICROPY_GC_SPLIT_HEAP_AUTO "auto grow heap" mode.
      Angus Gratton authored and moon2's avatar moon2 committed
      
      When set, the split heap is automatically extended with new areas on
      demand, and shrunk if a heap area becomes empty during a GC pass or soft
      reset.
      
      To save code size the size allocation for a new heap block (including
      metadata) is estimated at 103% of the failed allocation, rather than
      working from the more complex algorithm in gc_try_add_heap(). This appears
      to work well except in the extreme limit case when almost all RAM is
      exhausted (~last few hundred bytes). However in this case some allocation
      is likely to fail soon anyhow.
      
      Currently there is no API to manually add a block of a given size to the
      heap, although that could easily be added if necessary.
      
      This work was funded through GitHub Sponsors.
      
      Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>