version 1.1.2.3, 2012/02/28 00:25:25
|
version 1.1.2.4, 2012/02/28 00:37:35
|
Line 22 main(int argc, char **argv)
|
Line 22 main(int argc, char **argv)
|
} |
} |
|
|
for (i = 0; i < 3; i++) { |
for (i = 0; i < 3; i++) { |
|
addr = mpool_malloc(mp, 4000, "mdaaa 4000"); |
|
if (!addr) { |
|
printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
|
mpool_destroy(&mp); |
|
return 2; |
|
} |
|
printf("addr=%p chkaddr=%d addr_size=%d\n", addr, mpool_chkaddr(addr), mpool_getsizebyaddr(addr)); |
|
|
|
strlcpy(addr, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ndddddd\n", |
|
mpool_getsizebyaddr(addr)); |
|
// mpool_free(mp, addr, 0); |
|
} |
|
|
|
mpool_free(mp, addr, 0); |
|
|
|
mpool_purge(mp, 0); |
|
|
addr = mpool_malloc(mp, 4000, "mdaaa 4000"); |
addr = mpool_malloc(mp, 4000, "mdaaa 4000"); |
if (!addr) { |
if (!addr) { |
printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
printf("Error:: #%d - %s\n", sess_GetErrno(), sess_GetError()); |
Line 29 main(int argc, char **argv)
|
Line 46 main(int argc, char **argv)
|
return 2; |
return 2; |
} |
} |
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)); |
|
|
strlcpy(addr, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ndddddd\n", |
|
mpool_getsizebyaddr(addr)); |
|
mpool_free(mp, addr, 0); |
mpool_free(mp, addr, 0); |
} |
|
|
|
mpool_purge(mp, 1); |
|
|
|
mpool_destroy(&mp); |
mpool_destroy(&mp); |
return 0; |
return 0; |