emergency commit
[cl-cudd.git] / distr / mnemosyne / mtest.c
blob5a51a0a0455fa06cd990e110ebf6ce417dd0f98d
1 #include "mnemosyne.h"
3 static char rcsid[] = "/fats/tools/hsv/mnemosyne/mtest.c,v 1.1.1.1 1995/06/06 18:18:27 fabio Exp";
5 /*
6 test harness/demo of mnemosyne library. deliberately leaks memory on the
7 floor, double frees, frees unallocated memory, etc.
9 Marcus J. Ranum, 1990. (mjr@decuac.dec.com)
13 main()
15 char *d = "foobar";
16 char *xx;
17 int x;
19 xx = malloc(922);
20 xx = malloc(123);
22 /* huh ? */
23 xx = malloc(-9);
25 /* waste some memory */
26 for(x = 1; x < 8; x++)
27 xx = malloc(x);
29 /* free something we don't own */
30 free(d);
32 /* double free something */
33 free(xx);
34 free(xx);
36 /* not necessary - this triggers a better printout of statistics */
37 mnem_writestats();