1. 15 8月, 2023 3 次提交
    • A
      esp32: Allow malloc() to allocate from SPIRAM. · 98fd7843
      Angus Gratton 提交于
      Also shrinks the "prefer internal" threshold to 8KB, any allocation larger
      than this will try PSRAM first.
      
      Change the mbedTLS config to use regular malloc() as well, instead of
      internal only.  The default is set to internal-only due to to potential
      physical security issue of readout via PSRAM on the original ESP32.
      However, as MicroPython runs from plaintext flash and all other context is
      in the MP heap of PSRAM then it's hard to see how worsens physical security
      for MP.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: NAngus Gratton <angus@redyak.com.au>
      98fd7843
    • A
      py/gc: Add new MICROPY_GC_SPLIT_HEAP_AUTO "auto grow heap" mode. · 519c24dd
      Angus Gratton 提交于
      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: NAngus Gratton <angus@redyak.com.au>
      519c24dd
    • A
      py/gc: Apply some code formatting cleanup. · d325ee45
      Angus Gratton 提交于
      This commit:
      - Breaks up some long lines for readability.
      - Fixes a potential macro argument expansion issue.
      
      This work was funded through GitHub Sponsors.
      Signed-off-by: NAngus Gratton <angus@redyak.com.au>
      d325ee45
  2. 14 8月, 2023 2 次提交
  3. 10 8月, 2023 4 次提交
  4. 09 8月, 2023 3 次提交
  5. 07 8月, 2023 7 次提交
  6. 06 8月, 2023 2 次提交
  7. 05 8月, 2023 1 次提交
  8. 04 8月, 2023 2 次提交
    • R
      docs/develop/gettingstarted: Clarify submodule initialization. · 7fad499d
      Rene Straub 提交于
      When building for a specific board this must be specified in make
      submodules.  I.e. make BOARD=STM32F769DISC submodules.
      Signed-off-by: NRene Straub <rene@see5.ch>
      7fad499d
    • D
      py/gc: Speed up incremental GC cycles by tracking the last used block. · 2dcd7454
      Damien Tournoud 提交于
      In applications that use little memory and run GC regularly, the cost of
      the sweep phase quickly becomes prohibitives as the amount of RAM
      increases.
      
      On an ESP32-S3 with 2 MB of external SPIRAM, for example, a trivial GC
      cycle takes a minimum of 40ms, virtually all of it in the sweep phase.
      
      Similarly, on the UNIX port with 1 GB of heap, a trivial GC takes 47 ms,
      again virtually all of it in the sweep phase.
      
      This commit speeds up the sweep phase in the case most of the heap is empty
      by keeping track of the ID of the highest block we allocated in an area
      since the last GC.
      
      The performance benchmark run on PYBV10 shows between +0 and +2%
      improvement across the existing performance tests.  These tests don't
      really stress the GC, so they were also run with gc.threshold(30000) and
      gc.threshold(10000).  For the 30000 case, performance improved by up to
      +10% with this commit.  For the 10000 case, performance improved by at
      least +10% on 6 tests, and up to +25%.
      Signed-off-by: NDamien George <damien@micropython.org>
      2dcd7454
  9. 01 8月, 2023 1 次提交
  10. 27 7月, 2023 2 次提交
  11. 25 7月, 2023 6 次提交
  12. 24 7月, 2023 7 次提交