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

metric for heap fragmentation (#5090)

* +Esp.getHeapUnfragness()

* only in debug mode

* default value

* always enable, 64->32, light 32 integer square root, comments

* fix when debugging is disabled

* give credits

* cosmetics

* fragmentation metric updates (doc, better api, added getMaxFreeBlockSize())

* api reworked, +example

* fixe types, fix names

* coding style fix

* use astyle for example
This commit is contained in:
david gauchard
2018-09-10 06:50:01 +02:00
committed by Develo
parent bbaea5a358
commit ce28a76a24
11 changed files with 227 additions and 5 deletions

View File

@ -83,6 +83,10 @@ Some ESP-specific APIs related to deep sleep, RTC and flash memories are availab
``ESP.getFreeHeap()`` returns the free heap size.
``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.getChipId()`` returns the ESP8266 chip ID as a 32-bit integer.
``ESP.getCoreVersion()`` returns a String containing the core version.