mbed library sources. Supersedes mbed-src.

Fork of mbed-dev by mbed official

Committer:
<>
Date:
Fri Sep 16 16:24:25 2016 +0100
Revision:
147:30b64687e01f
This updates the lib to the mbed lib v126

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 147:30b64687e01f 1 /* mbed Microcontroller Library
<> 147:30b64687e01f 2 * Copyright (c) 2006-2016 ARM Limited
<> 147:30b64687e01f 3 *
<> 147:30b64687e01f 4 * Licensed under the Apache License, Version 2.0 (the "License");
<> 147:30b64687e01f 5 * you may not use this file except in compliance with the License.
<> 147:30b64687e01f 6 * You may obtain a copy of the License at
<> 147:30b64687e01f 7 *
<> 147:30b64687e01f 8 * http://www.apache.org/licenses/LICENSE-2.0
<> 147:30b64687e01f 9 *
<> 147:30b64687e01f 10 * Unless required by applicable law or agreed to in writing, software
<> 147:30b64687e01f 11 * distributed under the License is distributed on an "AS IS" BASIS,
<> 147:30b64687e01f 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<> 147:30b64687e01f 13 * See the License for the specific language governing permissions and
<> 147:30b64687e01f 14 * limitations under the License.
<> 147:30b64687e01f 15 */
<> 147:30b64687e01f 16
<> 147:30b64687e01f 17 #include "mbed_mem_trace.h"
<> 147:30b64687e01f 18 #include "mbed_stats.h"
<> 147:30b64687e01f 19 #include "toolchain.h"
<> 147:30b64687e01f 20 #include "SingletonPtr.h"
<> 147:30b64687e01f 21 #include "PlatformMutex.h"
<> 147:30b64687e01f 22 #include <stddef.h>
<> 147:30b64687e01f 23 #include <stdio.h>
<> 147:30b64687e01f 24 #include <string.h>
<> 147:30b64687e01f 25 #include <stdlib.h>
<> 147:30b64687e01f 26
<> 147:30b64687e01f 27 /* There are two memory tracers in mbed OS:
<> 147:30b64687e01f 28
<> 147:30b64687e01f 29 - the first can be used to detect the maximum heap usage at runtime. It is
<> 147:30b64687e01f 30 activated by defining the MBED_HEAP_STATS_ENABLED macro.
<> 147:30b64687e01f 31 - the second can be used to trace each memory call by automatically invoking
<> 147:30b64687e01f 32 a callback on each memory operation (see hal/api/mbed_mem_trace.h). It is
<> 147:30b64687e01f 33 activated by defining the MBED_MEM_TRACING_ENABLED macro.
<> 147:30b64687e01f 34
<> 147:30b64687e01f 35 Both tracers can be activated and deactivated in any combination. If both tracers
<> 147:30b64687e01f 36 are active, the second one (MBED_MEM_TRACING_ENABLED) will trace the first one's
<> 147:30b64687e01f 37 (MBED_HEAP_STATS_ENABLED) memory calls.*/
<> 147:30b64687e01f 38
<> 147:30b64687e01f 39 /******************************************************************************/
<> 147:30b64687e01f 40 /* Implementation of the runtime max heap usage checker */
<> 147:30b64687e01f 41 /******************************************************************************/
<> 147:30b64687e01f 42
<> 147:30b64687e01f 43 /* Size must be a multiple of 8 to keep alignment */
<> 147:30b64687e01f 44 typedef struct {
<> 147:30b64687e01f 45 uint32_t size;
<> 147:30b64687e01f 46 uint32_t pad;
<> 147:30b64687e01f 47 } alloc_info_t;
<> 147:30b64687e01f 48
<> 147:30b64687e01f 49 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 50 static SingletonPtr<PlatformMutex> mem_trace_mutex;
<> 147:30b64687e01f 51 #endif
<> 147:30b64687e01f 52 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 53 static SingletonPtr<PlatformMutex> malloc_stats_mutex;
<> 147:30b64687e01f 54 static mbed_stats_heap_t heap_stats = {0, 0, 0, 0, 0};
<> 147:30b64687e01f 55 #endif
<> 147:30b64687e01f 56
<> 147:30b64687e01f 57 void mbed_stats_heap_get(mbed_stats_heap_t *stats)
<> 147:30b64687e01f 58 {
<> 147:30b64687e01f 59 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 60 malloc_stats_mutex->lock();
<> 147:30b64687e01f 61 memcpy(stats, &heap_stats, sizeof(mbed_stats_heap_t));
<> 147:30b64687e01f 62 malloc_stats_mutex->unlock();
<> 147:30b64687e01f 63 #else
<> 147:30b64687e01f 64 memset(stats, 0, sizeof(mbed_stats_heap_t));
<> 147:30b64687e01f 65 #endif
<> 147:30b64687e01f 66 }
<> 147:30b64687e01f 67
<> 147:30b64687e01f 68 /******************************************************************************/
<> 147:30b64687e01f 69 /* GCC memory allocation wrappers */
<> 147:30b64687e01f 70 /******************************************************************************/
<> 147:30b64687e01f 71
<> 147:30b64687e01f 72 #if defined(TOOLCHAIN_GCC)
<> 147:30b64687e01f 73
<> 147:30b64687e01f 74 #ifdef FEATURE_UVISOR
<> 147:30b64687e01f 75 #include "uvisor-lib/uvisor-lib.h"
<> 147:30b64687e01f 76 #endif/* FEATURE_UVISOR */
<> 147:30b64687e01f 77
<> 147:30b64687e01f 78 extern "C" {
<> 147:30b64687e01f 79 void * __real__malloc_r(struct _reent * r, size_t size);
<> 147:30b64687e01f 80 void * __real__realloc_r(struct _reent * r, void * ptr, size_t size);
<> 147:30b64687e01f 81 void __real__free_r(struct _reent * r, void * ptr);
<> 147:30b64687e01f 82 void* __real__calloc_r(struct _reent * r, size_t nmemb, size_t size);
<> 147:30b64687e01f 83 }
<> 147:30b64687e01f 84
<> 147:30b64687e01f 85 // TODO: memory tracing doesn't work with uVisor enabled.
<> 147:30b64687e01f 86 #if !defined(FEATURE_UVISOR)
<> 147:30b64687e01f 87
<> 147:30b64687e01f 88 extern "C" void * __wrap__malloc_r(struct _reent * r, size_t size) {
<> 147:30b64687e01f 89 void *ptr = NULL;
<> 147:30b64687e01f 90 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 91 malloc_stats_mutex->lock();
<> 147:30b64687e01f 92 alloc_info_t *alloc_info = (alloc_info_t*)__real__malloc_r(r, size + sizeof(alloc_info_t));
<> 147:30b64687e01f 93 if (alloc_info != NULL) {
<> 147:30b64687e01f 94 alloc_info->size = size;
<> 147:30b64687e01f 95 ptr = (void*)(alloc_info + 1);
<> 147:30b64687e01f 96 heap_stats.current_size += size;
<> 147:30b64687e01f 97 heap_stats.total_size += size;
<> 147:30b64687e01f 98 heap_stats.alloc_cnt += 1;
<> 147:30b64687e01f 99 if (heap_stats.current_size > heap_stats.max_size) {
<> 147:30b64687e01f 100 heap_stats.max_size = heap_stats.current_size;
<> 147:30b64687e01f 101 }
<> 147:30b64687e01f 102 } else {
<> 147:30b64687e01f 103 heap_stats.alloc_fail_cnt += 1;
<> 147:30b64687e01f 104 }
<> 147:30b64687e01f 105 malloc_stats_mutex->unlock();
<> 147:30b64687e01f 106 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 107 ptr = __real__malloc_r(r, size);
<> 147:30b64687e01f 108 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 109 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 110 mem_trace_mutex->lock();
<> 147:30b64687e01f 111 mbed_mem_trace_malloc(ptr, size, MBED_CALLER_ADDR());
<> 147:30b64687e01f 112 mem_trace_mutex->unlock();
<> 147:30b64687e01f 113 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 114 return ptr;
<> 147:30b64687e01f 115 }
<> 147:30b64687e01f 116
<> 147:30b64687e01f 117 extern "C" void * __wrap__realloc_r(struct _reent * r, void * ptr, size_t size) {
<> 147:30b64687e01f 118 void *new_ptr = NULL;
<> 147:30b64687e01f 119 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 120 // Implement realloc_r with malloc and free.
<> 147:30b64687e01f 121 // The function realloc_r can't be used here directly since
<> 147:30b64687e01f 122 // it can call into __wrap__malloc_r (returns ptr + 4) or
<> 147:30b64687e01f 123 // resize memory directly (returns ptr + 0).
<> 147:30b64687e01f 124
<> 147:30b64687e01f 125 // Note - no lock needed since malloc and free are thread safe
<> 147:30b64687e01f 126
<> 147:30b64687e01f 127 // Get old size
<> 147:30b64687e01f 128 uint32_t old_size = 0;
<> 147:30b64687e01f 129 if (ptr != NULL) {
<> 147:30b64687e01f 130 alloc_info_t *alloc_info = ((alloc_info_t*)ptr) - 1;
<> 147:30b64687e01f 131 old_size = alloc_info->size;
<> 147:30b64687e01f 132 }
<> 147:30b64687e01f 133
<> 147:30b64687e01f 134 // Allocate space
<> 147:30b64687e01f 135 if (size != 0) {
<> 147:30b64687e01f 136 new_ptr = malloc(size);
<> 147:30b64687e01f 137 }
<> 147:30b64687e01f 138
<> 147:30b64687e01f 139 // If the new buffer has been allocated copy the data to it
<> 147:30b64687e01f 140 // and free the old buffer
<> 147:30b64687e01f 141 if (new_ptr != NULL) {
<> 147:30b64687e01f 142 uint32_t copy_size = (old_size < size) ? old_size : size;
<> 147:30b64687e01f 143 memcpy(new_ptr, (void*)ptr, copy_size);
<> 147:30b64687e01f 144 free(ptr);
<> 147:30b64687e01f 145 }
<> 147:30b64687e01f 146 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 147 new_ptr = __real__realloc_r(r, ptr, size);
<> 147:30b64687e01f 148 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 149 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 150 mem_trace_mutex->lock();
<> 147:30b64687e01f 151 mbed_mem_trace_realloc(new_ptr, ptr, size, MBED_CALLER_ADDR());
<> 147:30b64687e01f 152 mem_trace_mutex->unlock();
<> 147:30b64687e01f 153 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 154 return new_ptr;
<> 147:30b64687e01f 155 }
<> 147:30b64687e01f 156
<> 147:30b64687e01f 157 extern "C" void __wrap__free_r(struct _reent * r, void * ptr) {
<> 147:30b64687e01f 158 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 159 malloc_stats_mutex->lock();
<> 147:30b64687e01f 160 alloc_info_t *alloc_info = NULL;
<> 147:30b64687e01f 161 if (ptr != NULL) {
<> 147:30b64687e01f 162 alloc_info = ((alloc_info_t*)ptr) - 1;
<> 147:30b64687e01f 163 heap_stats.current_size -= alloc_info->size;
<> 147:30b64687e01f 164 heap_stats.alloc_cnt -= 1;
<> 147:30b64687e01f 165 }
<> 147:30b64687e01f 166 __real__free_r(r, (void*)alloc_info);
<> 147:30b64687e01f 167 malloc_stats_mutex->unlock();
<> 147:30b64687e01f 168 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 169 __real__free_r(r, ptr);
<> 147:30b64687e01f 170 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 171 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 172 mem_trace_mutex->lock();
<> 147:30b64687e01f 173 mbed_mem_trace_free(ptr, MBED_CALLER_ADDR());
<> 147:30b64687e01f 174 mem_trace_mutex->unlock();
<> 147:30b64687e01f 175 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 176 }
<> 147:30b64687e01f 177
<> 147:30b64687e01f 178 #endif // if !defined(FEATURE_UVISOR)
<> 147:30b64687e01f 179
<> 147:30b64687e01f 180 extern "C" void * __wrap__calloc_r(struct _reent * r, size_t nmemb, size_t size) {
<> 147:30b64687e01f 181 void *ptr = NULL;
<> 147:30b64687e01f 182 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 183 // Note - no lock needed since malloc is thread safe
<> 147:30b64687e01f 184
<> 147:30b64687e01f 185 ptr = malloc(nmemb * size);
<> 147:30b64687e01f 186 if (ptr != NULL) {
<> 147:30b64687e01f 187 memset(ptr, 0, nmemb * size);
<> 147:30b64687e01f 188 }
<> 147:30b64687e01f 189 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 190 ptr = __real__calloc_r(r, nmemb, size);
<> 147:30b64687e01f 191 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 192 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 193 mem_trace_mutex->lock();
<> 147:30b64687e01f 194 mbed_mem_trace_calloc(ptr, nmemb, size, MBED_CALLER_ADDR());
<> 147:30b64687e01f 195 mem_trace_mutex->unlock();
<> 147:30b64687e01f 196 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 197 return ptr;
<> 147:30b64687e01f 198 }
<> 147:30b64687e01f 199
<> 147:30b64687e01f 200
<> 147:30b64687e01f 201 /******************************************************************************/
<> 147:30b64687e01f 202 /* ARMCC memory allocation wrappers */
<> 147:30b64687e01f 203 /******************************************************************************/
<> 147:30b64687e01f 204
<> 147:30b64687e01f 205 #elif defined(TOOLCHAIN_ARM) // #if defined(TOOLCHAIN_GCC)
<> 147:30b64687e01f 206
<> 147:30b64687e01f 207 /* Enable hooking of memory function only if tracing is also enabled */
<> 147:30b64687e01f 208 #if defined(MBED_MEM_TRACING_ENABLED) || defined(MBED_HEAP_STATS_ENABLED)
<> 147:30b64687e01f 209
<> 147:30b64687e01f 210 extern "C" {
<> 147:30b64687e01f 211 void *$Super$$malloc(size_t size);
<> 147:30b64687e01f 212 void *$Super$$realloc(void *ptr, size_t size);
<> 147:30b64687e01f 213 void *$Super$$calloc(size_t nmemb, size_t size);
<> 147:30b64687e01f 214 void $Super$$free(void *ptr);
<> 147:30b64687e01f 215 }
<> 147:30b64687e01f 216
<> 147:30b64687e01f 217 extern "C" void* $Sub$$malloc(size_t size) {
<> 147:30b64687e01f 218 void *ptr = NULL;
<> 147:30b64687e01f 219 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 220 malloc_stats_mutex->lock();
<> 147:30b64687e01f 221 alloc_info_t *alloc_info = (alloc_info_t*)$Super$$malloc(size + sizeof(alloc_info_t));
<> 147:30b64687e01f 222 if (alloc_info != NULL) {
<> 147:30b64687e01f 223 alloc_info->size = size;
<> 147:30b64687e01f 224 ptr = (void*)(alloc_info + 1);
<> 147:30b64687e01f 225 heap_stats.current_size += size;
<> 147:30b64687e01f 226 heap_stats.total_size += size;
<> 147:30b64687e01f 227 heap_stats.alloc_cnt += 1;
<> 147:30b64687e01f 228 if (heap_stats.current_size > heap_stats.max_size) {
<> 147:30b64687e01f 229 heap_stats.max_size = heap_stats.current_size;
<> 147:30b64687e01f 230 }
<> 147:30b64687e01f 231 } else {
<> 147:30b64687e01f 232 heap_stats.alloc_fail_cnt += 1;
<> 147:30b64687e01f 233 }
<> 147:30b64687e01f 234 malloc_stats_mutex->unlock();
<> 147:30b64687e01f 235 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 236 ptr = $Super$$malloc(size);
<> 147:30b64687e01f 237 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 238 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 239 mem_trace_mutex->lock();
<> 147:30b64687e01f 240 mbed_mem_trace_malloc(ptr, size, MBED_CALLER_ADDR());
<> 147:30b64687e01f 241 mem_trace_mutex->unlock();
<> 147:30b64687e01f 242 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 243 return ptr;
<> 147:30b64687e01f 244 }
<> 147:30b64687e01f 245
<> 147:30b64687e01f 246 extern "C" void* $Sub$$realloc(void *ptr, size_t size) {
<> 147:30b64687e01f 247 void *new_ptr = NULL;
<> 147:30b64687e01f 248 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 249 // Note - no lock needed since malloc and free are thread safe
<> 147:30b64687e01f 250
<> 147:30b64687e01f 251 // Get old size
<> 147:30b64687e01f 252 uint32_t old_size = 0;
<> 147:30b64687e01f 253 if (ptr != NULL) {
<> 147:30b64687e01f 254 alloc_info_t *alloc_info = ((alloc_info_t*)ptr) - 1;
<> 147:30b64687e01f 255 old_size = alloc_info->size;
<> 147:30b64687e01f 256 }
<> 147:30b64687e01f 257
<> 147:30b64687e01f 258 // Allocate space
<> 147:30b64687e01f 259 if (size != 0) {
<> 147:30b64687e01f 260 new_ptr = malloc(size);
<> 147:30b64687e01f 261 }
<> 147:30b64687e01f 262
<> 147:30b64687e01f 263 // If the new buffer has been allocated copy the data to it
<> 147:30b64687e01f 264 // and free the old buffer
<> 147:30b64687e01f 265 if (new_ptr != NULL) {
<> 147:30b64687e01f 266 uint32_t copy_size = (old_size < size) ? old_size : size;
<> 147:30b64687e01f 267 memcpy(new_ptr, (void*)ptr, copy_size);
<> 147:30b64687e01f 268 free(ptr);
<> 147:30b64687e01f 269 }
<> 147:30b64687e01f 270 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 271 new_ptr = $Super$$realloc(ptr, size);
<> 147:30b64687e01f 272 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 273 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 274 mem_trace_mutex->lock();
<> 147:30b64687e01f 275 mbed_mem_trace_realloc(new_ptr, ptr, size, MBED_CALLER_ADDR());
<> 147:30b64687e01f 276 mem_trace_mutex->unlock();
<> 147:30b64687e01f 277 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 278 return new_ptr;
<> 147:30b64687e01f 279 }
<> 147:30b64687e01f 280
<> 147:30b64687e01f 281 extern "C" void *$Sub$$calloc(size_t nmemb, size_t size) {
<> 147:30b64687e01f 282 void *ptr = NULL;
<> 147:30b64687e01f 283 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 284 // Note - no lock needed since malloc is thread safe
<> 147:30b64687e01f 285 ptr = malloc(nmemb * size);
<> 147:30b64687e01f 286 if (ptr != NULL) {
<> 147:30b64687e01f 287 memset(ptr, 0, nmemb * size);
<> 147:30b64687e01f 288 }
<> 147:30b64687e01f 289 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 290 ptr = $Super$$calloc(nmemb, size);
<> 147:30b64687e01f 291 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 292 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 293 mem_trace_mutex->lock();
<> 147:30b64687e01f 294 mbed_mem_trace_calloc(ptr, nmemb, size, MBED_CALLER_ADDR());
<> 147:30b64687e01f 295 mem_trace_mutex->unlock();
<> 147:30b64687e01f 296 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 297 return ptr;
<> 147:30b64687e01f 298 }
<> 147:30b64687e01f 299
<> 147:30b64687e01f 300 extern "C" void $Sub$$free(void *ptr) {
<> 147:30b64687e01f 301 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 302 malloc_stats_mutex->lock();
<> 147:30b64687e01f 303 alloc_info_t *alloc_info = NULL;
<> 147:30b64687e01f 304 if (ptr != NULL) {
<> 147:30b64687e01f 305 alloc_info = ((alloc_info_t*)ptr) - 1;
<> 147:30b64687e01f 306 heap_stats.current_size -= alloc_info->size;
<> 147:30b64687e01f 307 heap_stats.alloc_cnt -= 1;
<> 147:30b64687e01f 308 }
<> 147:30b64687e01f 309 $Super$$free((void*)alloc_info);
<> 147:30b64687e01f 310 malloc_stats_mutex->unlock();
<> 147:30b64687e01f 311 #else // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 312 $Super$$free(ptr);
<> 147:30b64687e01f 313 #endif // #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 314 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 315 mem_trace_mutex->lock();
<> 147:30b64687e01f 316 mbed_mem_trace_free(ptr, MBED_CALLER_ADDR());
<> 147:30b64687e01f 317 mem_trace_mutex->unlock();
<> 147:30b64687e01f 318 #endif // #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 319 }
<> 147:30b64687e01f 320
<> 147:30b64687e01f 321 #endif // #if defined(MBED_MEM_TRACING_ENABLED) || defined(MBED_HEAP_STATS_ENABLED)
<> 147:30b64687e01f 322
<> 147:30b64687e01f 323 /******************************************************************************/
<> 147:30b64687e01f 324 /* Allocation wrappers for other toolchains are not supported yet */
<> 147:30b64687e01f 325 /******************************************************************************/
<> 147:30b64687e01f 326
<> 147:30b64687e01f 327 #else // #if defined(TOOLCHAIN_GCC)
<> 147:30b64687e01f 328
<> 147:30b64687e01f 329 #ifdef MBED_MEM_TRACING_ENABLED
<> 147:30b64687e01f 330 #warning Memory tracing is not supported with the current toolchain.
<> 147:30b64687e01f 331 #endif
<> 147:30b64687e01f 332
<> 147:30b64687e01f 333 #ifdef MBED_HEAP_STATS_ENABLED
<> 147:30b64687e01f 334 #warning Heap statistics are not supported with the current toolchain.
<> 147:30b64687e01f 335 #endif
<> 147:30b64687e01f 336
<> 147:30b64687e01f 337 #endif // #if defined(TOOLCHAIN_GCC)
<> 147:30b64687e01f 338