--- libaitsess/contrib/Attic/test_mem.c 2012/02/27 23:57:12 1.1.2.2 +++ libaitsess/contrib/Attic/test_mem.c 2012/02/28 00:25:25 1.1.2.3 @@ -7,10 +7,13 @@ main(int argc, char **argv) { mpool_t *mp; void *addr; - uintptr_t blah = 4000; int i; - printf("blah=%x\n", sizeof(uintptr_t) == sizeof(u_int) ? 0 : blah >> 32); + for (i = 0; i < 3; i++) { + addr = malloc(4000); + printf("addr=%p\n", addr); + free(addr); + } mp = mpool_init(); if (!mp) { @@ -29,7 +32,7 @@ main(int argc, char **argv) strlcpy(addr, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ndddddd\n", mpool_getsizebyaddr(addr)); -// mpool_free(mp, addr, 0); + mpool_free(mp, addr, 0); } mpool_purge(mp, 1);