1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-23 08:45:22 +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

@ -24,6 +24,7 @@
#include <memory>
#include "interrupts.h"
#include "MD5Builder.h"
#include "umm_malloc/umm_malloc.h"
extern "C" {
#include "user_interface.h"
@ -171,6 +172,11 @@ uint32_t EspClass::getFreeHeap(void)
return system_get_free_heap_size();
}
uint16_t EspClass::getMaxFreeBlockSize(void)
{
return umm_max_block_size();
}
uint32_t EspClass::getChipId(void)
{
return system_get_chip_id();