From: Anthony Minessale Date: Fri, 7 Apr 2017 22:21:45 +0000 (-0500) Subject: add test to repro bug X-Git-Tag: v1.8.0~624 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8065691b3f7af4aa9770679a3a59332c69e2860b;p=thirdparty%2Ffreeswitch.git add test to repro bug --- diff --git a/libs/libks/src/ks_pool.c b/libs/libks/src/ks_pool.c index 0bafffe3d9..abe1770bd5 100644 --- a/libs/libks/src/ks_pool.c +++ b/libs/libks/src/ks_pool.c @@ -52,7 +52,7 @@ typedef struct alloc_prefix_s { } alloc_prefix_t; #define PREFIX_SIZE sizeof(struct alloc_prefix_s) -//#define DEBUG 1 +#define DEBUG 1 /* * bitflag tools for Variable and a Flag */ diff --git a/libs/libks/test/testpools.c b/libs/libks/test/testpools.c index b666284ca7..2b0f946347 100644 --- a/libs/libks/test/testpools.c +++ b/libs/libks/test/testpools.c @@ -62,6 +62,17 @@ int main(int argc, char **argv) } } + + status = ks_pool_open(&pool); + + void *blah = ks_pool_alloc(pool, 64 * 1024); + + ks_pool_free(pool, &blah); + + blah = ks_pool_alloc(pool, 2 * 1024); + + ks_pool_close(&pool); + status = ks_pool_open(&pool); printf("OPEN: %p\n", (void *)pool);