version 1.1.2.6, 2012/02/28 09:36:36
|
version 1.1.2.7, 2012/02/28 09:42:57
|
Line 48 main(int argc, char **argv)
|
Line 48 main(int argc, char **argv)
|
// mpool_free(mp, addr, 0); |
// mpool_free(mp, addr, 0); |
} |
} |
|
|
printf("1)\n"); | 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); |
|
|
mpool_free(mp, addr, 0); |
mpool_free(mp, addr, 0); |
|
|
printf("2)\n"); | 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); |
|
|
mpool_purge(mp, 0); |
mpool_purge(mp, 0); |
|
|
printf("3)\n"); | 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); |
|
|
addr = mpool_malloc(mp, 4000, "mdaaa 4000"); |
addr = mpool_malloc(mp, 4000, "mdaaa 4000"); |
Line 70 main(int argc, char **argv)
|
Line 76 main(int argc, char **argv)
|
printf("addr=%p chkaddr=%d addr_size=%d\n", addr, mpool_chkaddr(addr), mpool_getsizebyaddr(addr)); |
printf("addr=%p chkaddr=%d addr_size=%d\n", addr, mpool_chkaddr(addr), mpool_getsizebyaddr(addr)); |
mpool_free(mp, addr, 0); |
mpool_free(mp, addr, 0); |
|
|
printf("Done.\n"); | 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); |
mpool_destroy(&mp); |
mpool_destroy(&mp); |
return 0; |
return 0; |