--- libelwix/example/test_mem.c 2015/07/01 21:48:39 1.5 +++ libelwix/example/test_mem.c 2024/04/15 09:50:57 1.5.78.1 @@ -64,7 +64,7 @@ main(int argc, char **argv) printf("0) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\n", mp->pool_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, mp->pool_bytes.alloc, mp->pool_bytes.cache, mp->pool_bytes.free); - mpool_statistics(mp, show); + mpool_statistics(mp, show, NULL, 0); printf(">>> realloc 4000 to 5010 addr=%p\n", addr); addr = mpool_realloc(mp, addr, 5010, "|||||||||||||"); @@ -76,7 +76,7 @@ main(int argc, char **argv) printf("1) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\n", mp->pool_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, mp->pool_bytes.alloc, mp->pool_bytes.cache, mp->pool_bytes.free); - mpool_statistics(mp, show); + mpool_statistics(mp, show, NULL, 0); printf(">>> free addr=%p\n", addr); @@ -86,7 +86,7 @@ main(int argc, char **argv) printf("2) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\n", mp->pool_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, mp->pool_bytes.alloc, mp->pool_bytes.cache, mp->pool_bytes.free); - mpool_statistics(mp, show); + mpool_statistics(mp, show, NULL, 0); printf(">>> purge inactive memory\n"); mpool_purge(mp, 0); @@ -97,7 +97,7 @@ main(int argc, char **argv) printf("3) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\n", mp->pool_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, mp->pool_bytes.alloc, mp->pool_bytes.cache, mp->pool_bytes.free); - mpool_statistics(mp, show); + mpool_statistics(mp, show, NULL, 0); printf(">>> alloc new 4000\n"); addr = mpool_malloc(mp, 4000, "mdaaa 4000"); @@ -113,7 +113,7 @@ main(int argc, char **argv) printf("4) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\n", mp->pool_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, mp->pool_bytes.alloc, mp->pool_bytes.cache, mp->pool_bytes.free); - mpool_statistics(mp, show); + mpool_statistics(mp, show, NULL, 0); printf("realloc 4000 to 100000 and to 2000000\n"); @@ -127,7 +127,7 @@ main(int argc, char **argv) printf("5) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\n", mp->pool_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, mp->pool_bytes.alloc, mp->pool_bytes.cache, mp->pool_bytes.free); - mpool_statistics(mp, show); + mpool_statistics(mp, show, NULL, 0); mpool_dump(mp, NULL);