Example to demonstrate memory trace functionality in Mbed OS

Fork of memory_tracing_example by mbed_example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include <stdlib.h>
00002 #include "mbed.h"
00003 #include "mbed_mem_trace.h"
00004 
00005 
00006 int main() {
00007     mbed_mem_trace_set_callback(mbed_mem_trace_default_callback);
00008     while (true) {
00009         void *p = malloc(50);
00010         wait(0.5);
00011         free(p);
00012     }
00013 }