|
|
| version 1.1.2.8, 2012/02/28 10:34:43 | version 1.1.2.13, 2012/02/28 12:49:59 |
|---|---|
| Line 34 main(int argc, char **argv) | Line 34 main(int argc, char **argv) |
| printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); | printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
| return 1; | return 1; |
| } | } |
| /* | |
| mpool_getquota(mp, &curr, NULL); | |
| printf("___current=%lu\n", curr); | |
| */ | |
| for (i = 0; i < 3; i++) { | for (i = 0; i < 3; i++) { |
| addr = mpool_malloc(mp, 4000, "mdaaa 4000"); | addr = mpool_malloc(mp, 4000, "mdaaa 4000"); |
| Line 52 main(int argc, char **argv) | Line 56 main(int argc, char **argv) |
| mpool_getquota(mp, &curr, NULL); | mpool_getquota(mp, &curr, NULL); |
| printf("___current=%lu\n", curr); | printf("___current=%lu\n", curr); |
| 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); | |
| addr = mpool_realloc(mp, addr, 5010, "|||||||||||||"); | |
| if (!addr) | |
| printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); | |
| mpool_getquota(mp, &curr, NULL); | |
| printf("addr=%p_current=%lu\n", addr, curr); | |
| printf("1) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\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_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, |
| mp->pool_bytes.alloc, mp->pool_bytes.cache, mp->pool_bytes.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); | |
| if (addr) | |
| mpool_free(mp, addr, 0); | |
| printf("2) calls.act=%lu calls.inact=%lu calls.free=%lu; bytes.act=%lu bytes.inact=%lu bytes.free=%lu;\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_calls.alloc, mp->pool_calls.cache, mp->pool_calls.free, |