Skip to content

Commit 0deb874

Browse files
Document ESP.getMaxFreeBlockSize() != max malloc size (#7328)
Fixes #7322. Because of UMM internals, the largest `malloc()`able block will be smaller than the largest contiguous free RAM block. Note in the docs.
1 parent 52b3e5b commit 0deb874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: doc/libraries.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Some ESP-specific APIs related to deep sleep, RTC and flash memories are availab
8787

8888
``ESP.getHeapFragmentation()`` returns the fragmentation metric (0% is clean, more than ~50% is not harmless)
8989

90-
``ESP.getMaxFreeBlockSize()`` returns the maximum allocatable ram block regarding heap fragmentation
90+
``ESP.getMaxFreeBlockSize()`` returns the largest contiguous free RAM block in the heap, useful for checking heap fragmentation. **NOTE:** Maximum ``malloc()``able block will be smaller due to memory manager overheads.
9191
9292
``ESP.getChipId()`` returns the ESP8266 chip ID as a 32-bit integer.
9393

0 commit comments

Comments
 (0)