8000 PoC cache configuration control by mhightower83 · Pull Request #7060 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

PoC cache configuration control #7060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 89 commits into from
Dec 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
fc63320
PoC cache configuration control
mhightower83 Feb 4, 2020
57043bd
Style corrections
mhightower83 Feb 4, 2020
17ceceb
Merge branch 'master' into poc-cache-config
mhightower83 Feb 7, 2020
7424aed
Added detailed description for Cache_Read_Enable.
mhightower83 Feb 11, 2020
56306d3
Merge branch 'master' into poc-cache-config
mhightower83 Feb 13, 2020
0645923
Style and MMU_SEC_HEAP corrections.
mhightower83 Feb 13, 2020
a6bb5a1
Improved asm register usage.
mhightower83 Feb 14, 2020
5bb3e19
Merge branch 'master' into poc-cache-config
mhightower83 Feb 27, 2020
b443e43
Interesting glitch in boards.txt after github merge. A new board in
mhightower83 Feb 28, 2020
0c661db
Support for 2nd Heap, excess IRAM, through umm_malloc.
mhightower83 Mar 2, 2020
c6eabc5
Merge branch 'master' into poc-cache-config
mhightower83 Mar 2, 2020
70842de
Post push CI cleanup.
mhightower83 Mar 2, 2020
f35290b
Cleanup part II
mhightower83 Mar 3, 2020
71e36cb
Cleanup part III
mhightower83 Mar 3, 2020
edf008a
Updates to support platformio, maybe.
mhightower83 Mar 5, 2020
161e7bc
Added exception C wrapper replacement.
mhightower83 Mar 5, 2020
5ac46f7
Merge branch 'master' into poc-cache-config
mhightower83 Mar 6, 2020
91fc391
CI Cleanup
mhightower83 Mar 6, 2020
eb9882e
CI Cleanup II
mhightower83 Mar 6, 2020
1422b8d
Changes to exc-c-wrapper-handler.S to assemble under platformio.
mhightower83 Mar 6, 2020
b921e11
For platformio, Correction to toolchain-xtensa include path.
mhightower83 Mar 6, 2020
cfb3826
Temporarily added --print-memory-usage to ld parameters for cross-che…
mhightower83 Mar 6, 2020
a1cd3a2
Merge branch 'master' into poc-cache-config
mhightower83 Mar 17, 2020
352a2ed
Merge branch 'poc-cache-config' of github.com:mhightower83/Arduino in…
mhightower83 Mar 17, 2020
062f8dc
Merge branch 'master' into poc-cache-config
mhightower83 Mar 27, 2020
69fdd5b
Merge branch 'master' into poc-cache-config
mhightower83 Apr 9, 2020
d5dac93
Merge branch 'master' into poc-cache-config
mhightower83 Apr 16, 2020
9d3a7de
Merge branch 'poc-cache-config' of github.com:mhightower83/Arduino in…
mhightower83 Apr 28, 2020
ecd826c
undo change to platform.txt
mhightower83 Apr 28, 2020
a9b92e2
correct merge conflict. take 1
mhightower83 Apr 28, 2020
5a99afc
Merge branch 'master' into poc-cache-config
mhightower83 Apr 28, 2020
f51dd82
Merge branch 'master' into poc-cache-config
mhightower83 Apr 29, 2020
71ef229
Merge branch 'master' into poc-cache-config
mhightower83 May 9, 2020
1a9d909
Fixed #if... for building umm_get_oom_count. It was not building when…
mhightower83 May 10, 2020
7b4a8d4
Commented out XMC support. Compatibility issues with PoC when using 1…
mhightower83 May 17, 2020
d9ab27e
Merge branch 'master' into poc-cache-config
mhightower83 May 17, 2020
6d18190
Corrected size.py, DRAM bracketing changed to not include ICACHE with…
mhightower83 May 25, 2020
50fe8a3
Merge branch 'master' into poc-cache-config
mhightower83 May 25, 2020
f62ff0a
Merge branch 'master' into poc-cache-config
mhightower83 May 31, 2020
1847a72
Merge branch 'master' into poc-cache-config
mhightower83 Jun 14, 2020
d3ace64
Added additional _context for support of use of UMM_INLINE_METRICS.
mhightower83 Jun 19, 2020
a43a2a8
Merge branch 'master' into poc-cache-config
mhightower83 Jun 19, 2020
2f47516
Merge branch 'master' into poc-cache-config
mhightower83 Jul 5, 2020
fd8f942
Merge branch 'master' into poc-cache-config
mhightower83 Jul 7, 2020
74df810
Changes to clear errors and warnings from toolchain 10.1
mhightower83 Jul 13, 2020
b767a5d
Isolated incompatable definitions related to _xtos_set_exception_hand…
mhightower83 Jul 14, 2020
e7402d8
Update tools/platformio-build.py
mhightower83 Jul 17, 2020
51ea542
Merge branch 'master' into poc-cache-config
mhightower83 Jul 17, 2020
3ff489c
Merge branch 'master' into poc-cache-config
devyte Jul 18, 2020
232dce4
Requested changes
mhightower83 Jul 19, 2020
a3c9e02
Corrected comment. And added missing include.
mhightower83 Jul 23, 2020
fc5f611
Improve comment.
mhightower83 Jul 23, 2020
bbdf166
style and comment correction
mhightower83 Jul 23, 2020
b88d197
Added draft mmu.rst file and updated index.
mhightower83 Jul 23, 2020
b058f17
Updated mmu.rst
mhightower83 Jul 25, 2020
5e31ed5
Add a default MMU_IRAM_SIZE value for a new CI test to pass.
mhightower83 Jul 25, 2020
a4d28e2
CI appeasement
mhightower83 Jul 26, 2020
d45ceb0
CI appeasement with comment correction.
mhightower83 Jul 27, 2020
4831410
Ensure SYS always runs with DRAM Heap selected.
mhightower83 Jul 28, 2020
f64a7d0
Add/move heap stack overflow/underflow check to Esp.cpp where the eve…
mhightower83 Jul 28, 2020
2238535
Improved comment clarity of purpose for IramReserve.ino. Clean up MMU…
mhightower83 Jul 30, 2020
c070657
Added missing #include
mhightower83 Aug 4, 2020
be71429
Corrected usage of warning
mhightower83 Aug 4, 2020
50ea394
Merge branch 'master' into poc-cache-config
mhightower83 Aug 7, 2020
4d7e1e9
Merge branch 'poc-cache-config' of github.com:mhightower83/Arduino in…
mhightower83 Aug 7, 2020
61afce0
CI appeasement and use #message not #pragma message
mhightower83 Aug 7, 2020
d828d76
Merge branch 'master' into poc-cache-config
mhightower83 Sep 2, 2020
7d4a600
Updated git version of eboot.elf to match build version.
mhightower83 Sep 2, 2020
20d39ee
Merge branch 'master' into poc-cache-config
mhightower83 Sep 4, 2020
f33ed95
Merge branch 'master' into poc-cache-config
mhightower83 Sep 17, 2020
53894c7
Merge branch 'master' into poc-cache-config
mhightower83 Oct 2, 2020
5ee2136
Merge branch 'master' into poc-cache-config
devyte Oct 5, 2020
3f415f8
Remove conditional build option USE_ISR_SAFE_EXC_WRAPPER, always inst…
mhightower83 Oct 6, 2020
addb149
Merge branch 'master' into poc-cache-config
mhightower83 Oct 6, 2020
d7fb4ab
Updated mmu.rst
mhightower83 Oct 6, 2020
c8412a8
Merge branch 'master' into poc-cache-config
mhightower83 Oct 7, 2020
5786ec1
Merge branch 'master' into poc-cache-config
mhightower83 Oct 18, 2020
86c4e5a
Merge branch 'master' into poc-cache-config
mhightower83 Oct 22, 2020
0c9ae16
Merge branch 'master' into poc-cache-config
mhightower83 Oct 23, 2020
2f88e7b
Merge branch 'master' into poc-cache-config
mhightower83 Oct 28, 2020
6c324c1
Merge branch 'master' into poc-cache-config
mhightower83 Nov 11, 2020
929e79b
Merge branch 'master' into poc-cache-config
mhightower83 Nov 19, 2020
1875c73
Merge branch 'master' into poc-cache-config
mhightower83 Nov 20, 2020
d3f9a0a
Expanded and clarified comments.
mhightower83 Dec 1, 2020
e48d95e
Style fixes and more cleanup
mhightower83 Dec 2, 2020
3ab791b
Merge branch 'master' into poc-cache-config
mhightower83 Dec 2, 2020
a3bf35c
Style fix
mhightower83 Dec 2, 2020
1ff2aef
Remove unnessasary IRAM_ATTR from install_non32xfer_exception_handler
mhightower83 Dec 5, 2020
9f9e206
Merge branch 'master' into poc-cache-config
devyte Dec 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added additional _context for support of use of UMM_INLINE_METRICS.
Corrected some UMM_POSION missed edits.
  • Loading branch information
mhightower83 committed Jun 19, 2020
commit d3ace64113b25f6162b65c9c4c6f897714d86e9d
19 changes: 7 additions & 12 deletions cores/esp8266/Esp-frag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ void EspClass::getHeapStats(uint32_t* hfree, uint16_t* hmax, uint8_t* hfrag)
// 100 * (1 - sqrt(sum(hole-size²)) / sum(hole-size))

umm_info(NULL, false);
uint8_t block_size = umm_block_size();

uint32_t free_size = umm_free_heap_size_core();
if (hfree)
*hfree = ummHeapInfo.freeBlocks * block_size;
*hfree = free_size;
if (hmax)
*hmax = (uint16_t)ummHeapInfo.maxFreeContiguousBlocks * block_size;
*hmax = (uint16_t)umm_max_block_size_core();
if (hfrag) {
if (ummHeapInfo.freeBlocks) {
*hfrag = 100 - (sqrt32(ummHeapInfo.freeBlocksSquared) * 100) / ummHeapInfo.freeBlocks;
if (free_size) {
*hfrag = umm_fragmentation_metric_core();
} else {
*hfrag = 0;
}
Expand All @@ -46,11 +47,5 @@ void EspClass::getHeapStats(uint32_t* hfree, uint16_t* hmax, uint8_t* hfrag)

uint8_t EspClass::getHeapFragmentation()
{
#ifdef UMM_INLINE_METRICS
return (uint8_t)umm_fragmentation_metric();
#else
uint8_t hfrag;
getHeapStats(nullptr, nullptr, &hfrag);
return hfrag;
#endif
return (uint8_t)umm_fragmentation_metric();
}
103 changes: 63 additions & 40 deletions cores/esp8266/umm_malloc/umm_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* ----------------------------------------------------------------------------
*/

UMM_HEAP_INFO ummHeapInfo;
// UMM_HEAP_INFO ummHeapInfo;

void *umm_info( void *ptr, bool force ) {
UMM_CRITICAL_DECL(id_info);
Expand All @@ -41,7 +41,7 @@ void *umm_info( void *ptr, bool force ) {
* Clear out all of the entries in the ummHeapInfo structure before doing
* any calculations..
*/
memset( &ummHeapInfo, 0, sizeof( ummHeapInfo ) );
memset( &_context->info, 0, sizeof( _context->info ) );

DBGLOG_FORCE( force, "\n" );
DBGLOG_FORCE( force, "+----------+-------+--------+--------+-------+--------+--------+\n" );
Expand All @@ -65,18 +65,18 @@ void *umm_info( void *ptr, bool force ) {
while( UMM_NBLOCK(blockNo) & UMM_BLOCKNO_MASK ) {
size_t curBlocks = (UMM_NBLOCK(blockNo) & UMM_BLOCKNO_MASK )-blockNo;

++ummHeapInfo.totalEntries;
ummHeapInfo.totalBlocks += curBlocks;
++_context->info.totalEntries;
_context->info.totalBlocks += curBlocks;

/* Is this a free block? */

if( UMM_NBLOCK(blockNo) & UMM_FREELIST_MASK ) {
++ummHeapInfo.freeEntries;
ummHeapInfo.freeBlocks += curBlocks;
ummHeapInfo.freeBlocksSquared += (curBlocks * curBlocks);
++_context->info.freeEntries;
_context->info.freeBlocks += curBlocks;
_context->info.freeBlocksSquared += (curBlocks * curBlocks);

if (ummHeapInfo.maxFreeContiguousBlocks < curBlocks) {
ummHeapInfo.maxFreeContiguousBlocks = curBlocks;
if (_context->info.maxFreeContiguousBlocks < curBlocks) {
_context->info.maxFreeContiguousBlocks = curBlocks;
}

DBGLOG_FORCE( force, "|0x%08lx|B %5d|NB %5d|PB %5d|Z %5u|NF %5d|PF %5d|\n",
Expand All @@ -98,8 +98,8 @@ void *umm_info( void *ptr, bool force ) {
return( ptr );
}
} else {
++ummHeapInfo.usedEntries;
ummHeapInfo.usedBlocks += curBlocks;
++_context->info.usedEntries;
_context->info.usedBlocks += curBlocks;

DBGLOG_FORCE( force, "|0x%08lx|B %5d|NB %5d|PB %5d|Z %5u|\n",
DBGLOG_32_BIT_PTR(&UMM_BLOCK(blockNo)),
Expand Down Expand Up @@ -131,14 +131,14 @@ void *umm_info( void *ptr, bool force ) {
DBGLOG_FORCE( force, "+----------+-------+--------+--------+-------+--------+--------+\n" );

DBGLOG_FORCE( force, "Total Entries %5d Used Entries %5d Free Entries %5d\n",
ummHeapInfo.totalEntries,
ummHeapInfo.usedEntries,
ummHeapInfo.freeEntries );
_context->info.totalEntries,
_context->info.usedEntries,
_context->info.freeEntries );

DBGLOG_FORCE( force, "Total Blocks %5d Used Blocks %5d Free Blocks %5d\n",
ummHeapInfo.totalBlocks,
ummHeapInfo.usedBlocks,
ummHeapInfo.freeBlocks );
_context->info.totalBlocks,
_context->info.usedBlocks,
_context->info.freeBlocks );

DBGLOG_FORCE( force, "+--------------------------------------------------------------+\n" );

Expand All @@ -149,11 +149,11 @@ void *umm_info( void *ptr, bool force ) {

#if defined(UMM_STATS) || defined(UMM_STATS_FULL)
#if !defined(UMM_INLINE_METRICS)
if (ummHeapInfo.freeBlocks == _context->stats.free_blocks) {
if (_context->info.freeBlocks == _context->stats.free_blocks) {
DBGLOG_FORCE( force, "heap info Free blocks and heap statistics Free blocks match.\n");
} else {
DBGLOG_FORCE( force, "\nheap info Free blocks %5d != heap statistics Free Blocks %5d\n\n",
ummHeapInfo.freeBlocks,
_context->info.freeBlocks,
_context->stats.free_blocks );
}
DBGLOG_FORCE( force, "+--------------------------------------------------------------+\n" );
Expand All @@ -170,20 +170,31 @@ void *umm_info( void *ptr, bool force ) {

/* ------------------------------------------------------------------------ */

size_t umm_free_heap_size_core( void ) {
umm_heap_context_t *_context = umm_get_current_heap();
return (size_t)_context->info.freeBlocks * sizeof(umm_block);
}

size_t umm_free_heap_size( void ) {
#ifndef UMM_INLINE_METRICS
umm_info(NULL, false);
#endif
return (size_t)ummHeapInfo.freeBlocks * sizeof(umm_block);

return umm_free_heap_size_core();
}

//C Breaking change in upstream umm_max_block_size() was changed to
//C umm_max_free_block_size() keeping old function name for (dot) releases.
//C TODO: update at next major release.
//C size_t umm_max_free_block_size( void ) {
size_t umm_max_block_size_core( void ) {
umm_heap_context_t *_context = umm_get_current_heap();
return _context->info.maxFreeContiguousBlocks * sizeof(umm_block);
}

size_t umm_max_block_size( void ) {
umm_info(NULL, false);
return ummHeapInfo.maxFreeContiguousBlocks * sizeof(umm_block);
return umm_max_block_size_core();
}

/*
Expand All @@ -195,46 +206,58 @@ int umm_usage_metric( void ) {
#ifndef UMM_INLINE_METRICS
umm_info(NULL, false);
#endif
DBGLOG_DEBUG( "usedBlocks %d totalBlocks %d\n", umm_metrics.usedBlocks, ummHeapInfo.totalBlocks);
if (ummHeapInfo.freeBlocks)
return (int)((ummHeapInfo.usedBlocks * 100)/(ummHeapInfo.freeBlocks));

umm_heap_context_t *_context = umm_get_current_heap();

//C Note, umm_metrics also appears in the upstrean w/o definition. I suspect it is suppose to be ummHeapInfo.
// DBGLOG_DEBUG( "usedBlocks %d totalBlocks %d\n", umm_metrics.usedBlocks, ummHeapInfo.totalBlocks);
DBGLOG_DEBUG( "usedBlocks %d totalBlocks %d\n", _context->info.usedBlocks, _context->info.totalBlocks);
if (_context->info.freeBlocks)
return (int)((_context->info.usedBlocks * 100)/(_context->info.freeBlocks));

return -1; // no freeBlocks
}

uint32_t sqrt32 (uint32_t n);

int umm_fragmentation_metric( void ) {
#ifndef UMM_INLINE_METRICS
umm_info(NULL, false);
#endif
DBGLOG_DEBUG( "freeBlocks %d freeBlocksSquared %d\n", umm_metrics.freeBlocks, ummHeapInfo.freeBlocksSquared);
if (0 == ummHeapInfo.freeBlocks) {
int umm_fragmentation_metric_core( void ) {
umm_heap_context_t *_context = umm_get_current_heap();
// DBGLOG_DEBUG( "freeBlocks %d freeBlocksSquared %d\n", umm_metrics.freeBlocks, ummHeapInfo.freeBlocksSquared);
DBGLOG_DEBUG( "freeBlocks %d freeBlocksSquared %d\n", _context->info.freeBlocks, _context->info.freeBlocksSquared);
if (0 == _context->info.freeBlocks) {
return 0;
} else {
//upstream version: return (100 - (((uint32_t)(sqrtf(ummHeapInfo.freeBlocksSquared)) * 100)/(ummHeapInfo.freeBlocks)));
return (100 - (((uint32_t)(sqrt32(ummHeapInfo.freeBlocksSquared)) * 100)/(ummHeapInfo.freeBlocks)));
return (100 - (((uint32_t)(sqrt32(_context->info.freeBlocksSquared)) * 100)/(_context->info.freeBlocks)));
}
}

int umm_fragmentation_metric( void ) {
#ifndef UMM_INLINE_METRICS
umm_info(NULL, false);
#endif

return umm_fragmentation_metric_core();
}

#ifdef UMM_INLINE_METRICS
static void umm_fragmentation_metric_init( void ) {
ummHeapInfo.freeBlocks = UMM_NUMBLOCKS - 2;
ummHeapInfo.freeBlocksSquared = ummHeapInfo.freeBlocks * ummHeapInfo.freeBlocks;
static void umm_fragmentation_metric_init( umm_heap_context_t *_context ) {
_context->info.freeBlocks = UMM_NUMBLOCKS - 2;
_context->info.freeBlocksSquared = _context->info.freeBlocks * _context->info.freeBlocks;
}

static void umm_fragmentation_metric_add( uint16_t c ) {
static void umm_fragmentation_metric_add( umm_heap_context_t *_context, uint16_t c ) {
uint16_t blocks = (UMM_NBLOCK(c) & UMM_BLOCKNO_MASK) - c;
DBGLOG_DEBUG( "Add block %d size %d to free metric\n", c, blocks);
ummHeapInfo.freeBlocks += blocks;
ummHeapInfo.freeBlocksSquared += (blocks * blocks);
_context->info.freeBlocks += blocks;
_context->info.freeBlocksSquared += (blocks * blocks);
}

static void umm_fragmentation_metric_remove( uint16_t c ) {
static void umm_fragmentation_metric_remove( umm_heap_context_t *_context, uint16_t c ) {
uint16_t blocks = (UMM_NBLOCK(c) & UMM_BLOCKNO_MASK) - c;
DBGLOG_DEBUG( "Remove block %d size %d from free metric\n", c, blocks);
ummHeapInfo.freeBlocks -= blocks;
ummHeapInfo.freeBlocksSquared -= (blocks * blocks);
_context->info.freeBlocks -= blocks;
_context->info.freeBlocksSquared -= (blocks * blocks);
}
#endif // UMM_INLINE_METRICS

Expand Down
4 changes: 2 additions & 2 deletions cores/esp8266/umm_malloc/umm_local.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ UMM_TIME_STATS time_stats = {
#ifdef UMM_INFO
{0xFFFFFFFF, 0U, 0U, 0U},
#endif
#ifdef UMM_POISON_CHECK
#if defined(UMM_POISON_CHECK) || defined(UMM_POISON_CHECK_LITE)
{0xFFFFFFFF, 0U, 0U, 0U},
#endif
#ifdef UMM_INTEGRITY_CHECK
Expand Down Expand Up @@ -96,7 +96,7 @@ static void *get_unpoisoned_check_neighbors( void *vptr, const char* file, int l
UMM_CRITICAL_DECL(id_poison);
uint16_t c;
bool poison = false;
umm_heap_context_t *_context = umm_get_ptr_context( v_ptr );
umm_heap_context_t *_context = umm_get_ptr_context( vptr );
if (NULL == _context) {
panic();
return NULL;
Expand Down
3 changes: 3 additions & 0 deletions cores/esp8266/umm_malloc/umm_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ struct UMM_HEAP_CONTEXT {
void *heap_end;
#if (!defined(UMM_INLINE_METRICS) && defined(UMM_STATS)) || defined(UMM_STATS_FULL)
UMM_STATISTICS stats;
#endif
#ifdef UMM_INFO
UMM_HEAP_INFO info;
#endif
unsigned short int numblocks;
unsigned char id;
Expand Down
2 changes: 1 addition & 1 deletion cores/esp8266/umm_malloc/umm_malloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ void umm_init_common( size_t id, void *start_addr, size_t size, bool zero ) {
// post-crash discovery.
if (zero) {
memset(_context->heap, 0x00, size);
#if defined(UMM_STATS) || defined(UMM_STATS_FULL)
#if (!defined(UMM_INLINE_METRICS) && defined(UMM_STATS)) || defined(UMM_STATS_FULL)
memset(&_context->stats, 0x00, sizeof(_context->stats));
#endif

Expand Down
18 changes: 12 additions & 6 deletions cores/esp8266/umm_malloc/umm_malloc_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ extern char _heap_start[];
/* -------------------------------------------------------------------------- */

#ifdef UMM_INLINE_METRICS
#define UMM_FRAGMENTATION_METRIC_INIT() umm_fragmentation_metric_init()
#define UMM_FRAGMENTATION_METRIC_ADD(c) umm_fragmentation_metric_add(c)
#define UMM_FRAGMENTATION_METRIC_REMOVE(c) umm_fragmentation_metric_remove(c)
#define UMM_FRAGMENTATION_METRIC_INIT() umm_fragmentation_metric_init(_context)
#define UMM_FRAGMENTATION_METRIC_ADD(c) umm_fragmentation_metric_add(_context, c)
#define UMM_FRAGMENTATION_METRIC_REMOVE(c) umm_fragmentation_metric_remove(_context, c)
#ifndef UMM_INFO
#define UMM_INFO
#endif
Expand Down Expand Up @@ -231,14 +231,14 @@ extern char _heap_start[];
unsigned int freeBlocksSquared;
#ifdef UMM_INLINE_METRICS
size_t oom_count;
#define UMM_OOM_COUNT ummHeapInfo.oom_count
#define UMM_FREE_BLOCKS ummHeapInfo.freeBlocks
#define UMM_OOM_COUNT info.oom_count
#define UMM_FREE_BLOCKS info.freeBlocks
#endif
unsigned int maxFreeContiguousBlocks;
}
UMM_HEAP_INFO;

extern UMM_HEAP_INFO ummHeapInfo;
// extern UMM_HEAP_INFO ummHeapInfo;

extern ICACHE_FLASH_ATTR void *umm_info( void *ptr, bool force );
#ifdef UMM_INLINE_METRICS
Expand All @@ -250,12 +250,18 @@ extern char _heap_start[];
extern ICACHE_FLASH_ATTR size_t umm_max_block_size( void );
extern ICACHE_FLASH_ATTR int umm_usage_metric( void );
extern ICACHE_FLASH_ATTR int umm_fragmentation_metric( void );
extern ICACHE_FLASH_ATTR size_t umm_free_heap_size_core( void );
extern ICACHE_FLASH_ATTR size_t umm_max_block_size_core( void );
extern ICACHE_FLASH_ATTR int umm_fragmentation_metric_core( void );
#else
#define umm_info(p,b)
#define umm_free_heap_size() (0)
#define umm_max_block_size() (0)
#define umm_fragmentation_metric() (0)
#define umm_usage_metric() (0)
#define umm_free_heap_size_core() (0)
#define umm_max_block_size_core() (0)
#define umm_fragmentation_metric_core() (0)
#endif

struct UMM_HEAP_CONTEXT;
Expand Down
0