Hendrik Lipka / Mbed 2 deprecated malloc_test

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include <stdio.h>
00002 #include "mbed.h"
00003 
00004 #define MALLOC_SIZE 0x2000
00005 
00006 class C2: Base
00007 {
00008     public:
00009         C2(int a){_a=a;}
00010     private:
00011         int _a;
00012 };
00013 
00014 C2 a(1);
00015 C2 b(2);
00016 
00017 int main() {
00018     printf("doing test\n");
00019         malloc(MALLOC_SIZE);
00020         malloc(MALLOC_SIZE);
00021         malloc(MALLOC_SIZE);
00022         malloc(MALLOC_SIZE);
00023         printf("finished\n");
00024 }