]> granicus.if.org Git - pgbouncer/commitdiff
Refresh libusual
authorMarko Kreen <markokr@gmail.com>
Wed, 15 Sep 2010 13:14:40 +0000 (16:14 +0300)
committerMarko Kreen <markokr@gmail.com>
Wed, 15 Sep 2010 13:14:40 +0000 (16:14 +0300)
lib
src/objects.c
src/varcache.c

diff --git a/lib b/lib
index 2ee987fc7f7198ff1f4aaf771160e366df2339f9..4ccc2c438e843b34dd6d11a597f86804595cdf4d 160000 (submodule)
--- a/lib
+++ b/lib
@@ -1 +1 @@
-Subproject commit 2ee987fc7f7198ff1f4aaf771160e366df2339f9
+Subproject commit 4ccc2c438e843b34dd6d11a597f86804595cdf4d
index b55c9f81124c9faaa5c51dd3907f738d1e4f8dbd..faddcec1f6ee4b7c130806f349db766408e9953d 100644 (file)
@@ -98,9 +98,9 @@ static int user_node_cmp(long userptr, struct AANode *node)
 void init_objects(void)
 {
        aatree_init(&user_tree, user_node_cmp, NULL);
-       user_cache = slab_create("user_cache", sizeof(PgUser), 0, NULL);
-       db_cache = slab_create("db_cache", sizeof(PgDatabase), 0, NULL);
-       pool_cache = slab_create("pool_cache", sizeof(PgPool), 0, NULL);
+       user_cache = slab_create("user_cache", sizeof(PgUser), 0, NULL, USUAL_ALLOC);
+       db_cache = slab_create("db_cache", sizeof(PgDatabase), 0, NULL, USUAL_ALLOC);
+       pool_cache = slab_create("pool_cache", sizeof(PgPool), 0, NULL, USUAL_ALLOC);
 
        if (!user_cache || !db_cache || !pool_cache)
                fatal("cannot create initial caches");
@@ -115,9 +115,9 @@ static void do_iobuf_reset(void *arg)
 /* initialization after config loading */
 void init_caches(void)
 {
-       server_cache = slab_create("server_cache", sizeof(PgSocket), 0, construct_server);
-       client_cache = slab_create("client_cache", sizeof(PgSocket), 0, construct_client);
-       iobuf_cache = slab_create("iobuf_cache", IOBUF_SIZE, 0, do_iobuf_reset);
+       server_cache = slab_create("server_cache", sizeof(PgSocket), 0, construct_server, USUAL_ALLOC);
+       client_cache = slab_create("client_cache", sizeof(PgSocket), 0, construct_client, USUAL_ALLOC);
+       iobuf_cache = slab_create("iobuf_cache", IOBUF_SIZE, 0, do_iobuf_reset, USUAL_ALLOC);
 }
 
 /* state change means moving between lists */
index 3547bb52fc209f9c908eda67a02dfe6edf573bcd..9bc14f2ee8c2893b51c3682c3097e555b50c67b0 100644 (file)
@@ -51,7 +51,7 @@ bool varcache_set(VarCache *cache, const char *key, const char *value)
        struct PStr *pstr = NULL;
 
        if (!vpool) {
-               vpool = strpool_create();
+               vpool = strpool_create(USUAL_ALLOC);
                if (!vpool)
                        return false;
        }