memcheck: Handle Err_ReallocSizeZero in MC_(eq_Error)
[valgrind.git] / memcheck / tests / wrapmallocstatic.c
blobbe6573bf5f9ed7e931033f576196fc264e4df31b
1 #include <stdio.h>
2 #include <stdlib.h>
4 /* Test that a program that has malloc/free interposed in the
5 executable is also intercepted. */
7 int main ( void )
9 printf ("start\n");
10 void *p = malloc (1024);
11 free (p);
12 printf ("done\n");
13 return 0;
16 /* Fake malloc/free functions that just print something. When run
17 under memcheck these functions will be intercepted and not print
18 anything. */
20 void *malloc ( size_t size )
22 printf ("malloc\n");
23 return NULL;
26 void free (void *ptr)
28 printf ("free\n");