@@ -67,16 +67,16 @@ void mbed_stats_heap_get(mbed_stats_heap_t *stats)
67
67
#include " uvisor-lib/uvisor-lib.h"
68
68
#endif /* FEATURE_UVISOR */
69
69
70
- // TODO: memory tracing doesn't work with uVisor enabled.
71
- #if !defined(FEATURE_UVISOR)
72
-
73
70
extern " C" {
74
71
void * __real__malloc_r (struct _reent * r, size_t size);
75
72
void * __real__realloc_r (struct _reent * r, void * ptr, size_t size);
76
73
void __real__free_r (struct _reent * r, void * ptr);
77
74
void * __real__calloc_r (struct _reent * r, size_t nmemb, size_t size);
78
75
}
79
76
77
+ // TODO: memory tracing doesn't work with uVisor enabled.
78
+ #if !defined(FEATURE_UVISOR)
79
+
80
80
extern " C" void * __wrap__malloc_r (struct _reent * r, size_t size) {
81
81
void *ptr = NULL ;
82
82
#ifdef MBED_HEAP_STATS_ENABLED
@@ -167,6 +167,8 @@ extern "C" void __wrap__free_r(struct _reent * r, void * ptr) {
167
167
#endif // #ifdef MBED_MEM_TRACING_ENABLED
168
168
}
169
169
170
+ #endif // if !defined(FEATURE_UVISOR)
171
+
170
172
extern " C" void * __wrap__calloc_r (struct _reent * r, size_t nmemb, size_t size) {
171
173
void *ptr = NULL ;
172
174
#ifdef MBED_HEAP_STATS_ENABLED
@@ -187,7 +189,6 @@ extern "C" void * __wrap__calloc_r(struct _reent * r, size_t nmemb, size_t size)
187
189
return ptr;
188
190
}
189
191
190
- #endif // if !defined(FEATURE_UVISOR)
191
192
192
193
/* *****************************************************************************/
193
194
/* ARMCC memory allocation wrappers */
0 commit comments