@@ -56,15 +56,6 @@ Functions
56
56
two most useful ones are predefined as `esp32.HEAP_DATA ` for data heap regions and
57
57
`esp32.HEAP_EXEC ` for executable regions as used by the native code emitter.
58
58
59
- Free IDF heap memory in the `esp32.HEAP_DATA ` region is available to be
60
- automatically added to the MicroPython heap to prevent a MicroPython
61
- allocation from failing. However, the information returned here is otherwise
62
- *not * useful to troubleshoot Python allocation failures, use
63
- `micropython.mem_info() ` instead. The "max new split" value in
64
- `micropython.mem_info() ` output corresponds to the largest free block of
65
- ESP-IDF heap that could be automatically added on demand to the MicroPython
66
- heap.
67
-
68
59
The return value is a list of 4-tuples, where each 4-tuple corresponds to one heap
69
60
and contains: the total bytes, the free bytes, the largest free block, and
70
61
the minimum free seen over time.
@@ -75,6 +66,21 @@ Functions
75
66
[(240, 0, 0, 0), (7288, 0, 0, 0), (16648, 4, 4, 4), (79912, 35712, 35512, 35108),
76
67
(15072, 15036, 15036, 15036), (113840, 0, 0, 0)]
77
68
69
+ .. note :: Free IDF heap memory in the `esp32.HEAP_DATA` region is available
70
+ to be automatically added to the MicroPython heap to prevent a
71
+ MicroPython allocation from failing. However, the information returned
72
+ here is otherwise *not * useful to troubleshoot Python allocation
73
+ failures. :func: `micropython.mem_info() ` and :func: `gc.mem_free() ` should
74
+ be used instead:
75
+
76
+ The "max new split" value in :func: `micropython.mem_info() ` output
77
+ corresponds to the largest free block of ESP-IDF heap that could be
78
+ automatically added on demand to the MicroPython heap.
79
+
80
+ The result of :func: `gc.mem_free() ` is the total of the current "free"
81
+ and "max new split" values printed by :func: `micropython.mem_info() `.
82
+
83
+
78
84
Flash partitions
79
85
----------------
80
86
0 commit comments