root/trunk/umem_test.c

Revision 24, 320 bytes (checked in by richdawe, 8 years ago)

Add --enable-malloc-replacement option, for using libumem as a malloc replacement

  • Property svn:eol-style set to native
Line 
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4
5 #include "umem.h"
6
7 int main(int argc, char *argv[])
8 {
9   char *foo;
10  
11   umem_startup(NULL, 0, 0, NULL, NULL);
12
13   foo = umem_alloc(32, UMEM_DEFAULT);
14
15   strcpy(foo, "hello there");
16
17   printf("Hello %s\n", foo);
18
19   umem_free(foo, 32);
20
21   return EXIT_SUCCESS;
22 }
23
Note: See TracBrowser for help on using the browser.