Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HelloWorld_CCA01M1 HelloWorld_CCA02M1 CI-data-logger-server HelloWorld_CCA02M1 ... more
This is a fork of the events subdirectory of https://github.com/ARMmbed/mbed-os.
Note, you must import this library with import name: events!!!
Diff: hal/common/mbed_alloc_wrappers.cpp
- Revision:
- 7649:2edb2f062201
- Parent:
- 7606:dbabbb13e5b0
- Child:
- 7814:9b2b2d58d7dd
diff -r 75e4c00cee42 -r 2edb2f062201 hal/common/mbed_alloc_wrappers.cpp
--- a/hal/common/mbed_alloc_wrappers.cpp Fri Sep 02 11:03:21 2016 +0100
+++ b/hal/common/mbed_alloc_wrappers.cpp Fri Sep 02 11:07:19 2016 +0100
@@ -67,9 +67,6 @@
#include "uvisor-lib/uvisor-lib.h"
#endif/* FEATURE_UVISOR */
-// TODO: memory tracing doesn't work with uVisor enabled.
-#if !defined(FEATURE_UVISOR)
-
extern "C" {
void * __real__malloc_r(struct _reent * r, size_t size);
void * __real__realloc_r(struct _reent * r, void * ptr, size_t size);
@@ -77,6 +74,9 @@
void* __real__calloc_r(struct _reent * r, size_t nmemb, size_t size);
}
+// TODO: memory tracing doesn't work with uVisor enabled.
+#if !defined(FEATURE_UVISOR)
+
extern "C" void * __wrap__malloc_r(struct _reent * r, size_t size) {
void *ptr = NULL;
#ifdef MBED_HEAP_STATS_ENABLED
@@ -167,6 +167,8 @@
#endif // #ifdef MBED_MEM_TRACING_ENABLED
}
+#endif // if !defined(FEATURE_UVISOR)
+
extern "C" void * __wrap__calloc_r(struct _reent * r, size_t nmemb, size_t size) {
void *ptr = NULL;
#ifdef MBED_HEAP_STATS_ENABLED
@@ -187,7 +189,6 @@
return ptr;
}
-#endif // if !defined(FEATURE_UVISOR)
/******************************************************************************/
/* ARMCC memory allocation wrappers */