]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add test to repro bug
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 7 Apr 2017 22:21:45 +0000 (17:21 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 7 Apr 2017 22:21:45 +0000 (17:21 -0500)
libs/libks/src/ks_pool.c
libs/libks/test/testpools.c

index 0bafffe3d98a0ed21475a06761f3571fad6c3f64..abe1770bd5c62a84cf93bcb9af6a3c0280d7540e 100644 (file)
@@ -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
  */
index b666284ca7448c74d302a0500968fc4103a8fbd6..2b0f9463476e0f91e7ec1812816158f83da8f9b8 100644 (file)
@@ -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);