version 1.1.2.2, 2012/02/27 23:57:12
|
version 1.1.2.3, 2012/02/28 00:25:25
|
Line 7 main(int argc, char **argv)
|
Line 7 main(int argc, char **argv)
|
{ |
{ |
mpool_t *mp; |
mpool_t *mp; |
void *addr; |
void *addr; |
uintptr_t blah = 4000; |
|
int i; |
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(); |
mp = mpool_init(); |
if (!mp) { |
if (!mp) { |
Line 29 main(int argc, char **argv)
|
Line 32 main(int argc, char **argv)
|
|
|
strlcpy(addr, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ndddddd\n", |
strlcpy(addr, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ndddddd\n", |
mpool_getsizebyaddr(addr)); |
mpool_getsizebyaddr(addr)); |
// mpool_free(mp, addr, 0); | mpool_free(mp, addr, 0); |
} |
} |
|
|
mpool_purge(mp, 1); |
mpool_purge(mp, 1); |