1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-06 05:21:22 +03:00

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.
This commit is contained in:
Earle F. Philhower, III 2020-05-26 14:00:41 -07:00 committed by GitHub
parent 52b3e5b7b3
commit 0deb87483e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.