when split_heap, add 2nd heap size for total heap

pull/15531/head
Johannes Stratmann 2025-01-05 18:57:38 +01:00
parent 25b05a10ec
commit 3d82f3ca66
1 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,11 @@ void mbed_stats_heap_get(mbed_stats_heap_t *stats)
extern uint32_t mbed_heap_size;
heap_stats.reserved_size = mbed_heap_size;
#if defined(MBED_SPLIT_HEAP)
extern uint32_t mbed_heap_size_0;
heap_stats.reserved_size += mbed_heap_size_0;
#endif
malloc_stats_mutex->lock();
memcpy(stats, &heap_stats, sizeof(mbed_stats_heap_t));
malloc_stats_mutex->unlock();