Skip to content

Commit

Permalink
Document ESP.getMaxFreeBlockSize() != max malloc size (#7328)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
earlephilhower committed May 26, 2020
1 parent 52b3e5b commit 0deb874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Some ESP-specific APIs related to deep sleep, RTC and flash memories are availab

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

``ESP.getMaxFreeBlockSize()`` returns the maximum allocatable ram block regarding heap fragmentation
``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.
``ESP.getChipId()`` returns the ESP8266 chip ID as a 32-bit integer.

Expand Down

0 comments on commit 0deb874

Please sign in to comment.