diff options
author | Angus Gratton <angus@redyak.com.au> | 2023-08-02 16:51:07 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-08-15 10:50:46 +1000 |
commit | 05dcb8be9957d0ed6c9694629be186a40c1a3fd9 (patch) | |
tree | 67a372abfe26e7fced1f3a341d8347b44b066550 /docs | |
parent | 98fd78437c56efeebe2e38c944f5af0a1a59fe8a (diff) | |
download | micropython-05dcb8be9957d0ed6c9694629be186a40c1a3fd9.tar.gz micropython-05dcb8be9957d0ed6c9694629be186a40c1a3fd9.zip |
esp32: Enable automatic Python heap growth.
Via MICROPY_GC_SPLIT_HEAP_AUTO feature flag added in previous commit.
Tested on ESP32 GENERIC_SPIRAM and GENERIC_S3 configurations, with some
worst-case allocation patterns and the standard test suite.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/library/esp32.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/library/esp32.rst b/docs/library/esp32.rst index efdd6c1be2..856d9aef8d 100644 --- a/docs/library/esp32.rst +++ b/docs/library/esp32.rst @@ -51,13 +51,20 @@ Functions buffers and other data. This data is useful to get a sense of how much memory is available to ESP-IDF and the networking stack in particular. It may shed some light on situations where ESP-IDF operations fail due to allocation failures. - The information returned is *not* useful to troubleshoot Python allocation failures, - use `micropython.mem_info()` instead. The capabilities parameter corresponds to ESP-IDF's ``MALLOC_CAP_XXX`` values but the two most useful ones are predefined as `esp32.HEAP_DATA` for data heap regions and `esp32.HEAP_EXEC` for executable regions as used by the native code emitter. + Free IDF heap memory in the `esp32.HEAP_DATA` region is available to be + automatically added to the MicroPython heap to prevent a MicroPython + allocation from failing. However, the information returned here is otherwise + *not* useful to troubleshoot Python allocation failures, use + `micropython.mem_info()` instead. The "max new split" value in + `micropython.mem_info()` output corresponds to the largest free block of + ESP-IDF heap that could be automatically added on demand to the MicroPython + heap. + The return value is a list of 4-tuples, where each 4-tuple corresponds to one heap and contains: the total bytes, the free bytes, the largest free block, and the minimum free seen over time. |