Skip to content

Commit 3d82f3c

Browse files
committed
when split_heap, add 2nd heap size for total heap
1 parent 25b05a1 commit 3d82f3c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

platform/source/mbed_alloc_wrappers.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ void mbed_stats_heap_get(mbed_stats_heap_t *stats)
7676
extern uint32_t mbed_heap_size;
7777
heap_stats.reserved_size = mbed_heap_size;
7878

79+
#if defined(MBED_SPLIT_HEAP)
80+
extern uint32_t mbed_heap_size_0;
81+
heap_stats.reserved_size += mbed_heap_size_0;
82+
#endif
83+
7984
malloc_stats_mutex->lock();
8085
memcpy(stats, &heap_stats, sizeof(mbed_stats_heap_t));
8186
malloc_stats_mutex->unlock();

0 commit comments

Comments
 (0)