[dovecot-cvs] dovecot/src/lib Makefile.am,1.22,1.23 env-util.c,1.4,1.5 imem.c,1.3,1.4 mempool-alloconly.c,1.11,1.12 mempool.h,1.5,1.6 mempool.c,1.3,NONE
cras at procontrol.fi
cras at procontrol.fi
Sat Dec 21 15:08:52 EET 2002
Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv21177/lib
Modified Files:
Makefile.am env-util.c imem.c mempool-alloconly.c mempool.h
Removed Files:
mempool.c
Log Message:
We don't have separate read-write pools, so renamed pool_create(.., FALSE)
to pool_alloconly_create().
Index: Makefile.am
===================================================================
RCS file: /home/cvs/dovecot/src/lib/Makefile.am,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- Makefile.am 21 Dec 2002 12:13:58 -0000 1.22
+++ Makefile.am 21 Dec 2002 13:08:49 -0000 1.23
@@ -27,7 +27,6 @@
lib.c \
lib-signals.c \
md5.c \
- mempool.c \
mempool-alloconly.c \
mempool-datastack.c \
mempool-system.c \
Index: env-util.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/env-util.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- env-util.c 18 Dec 2002 04:05:11 -0000 1.4
+++ env-util.c 21 Dec 2002 13:08:49 -0000 1.5
@@ -33,7 +33,7 @@
void env_put(const char *env)
{
if (pool == NULL)
- pool = pool_create("Environment", 1024, FALSE);
+ pool = pool_alloconly_create("Environment", 1024);
if (putenv(p_strdup(pool, env)) != 0)
i_fatal("Environment full, can't add: %s", env);
Index: imem.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/imem.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- imem.c 8 Sep 2002 13:20:28 -0000 1.3
+++ imem.c 21 Dec 2002 13:08:49 -0000 1.4
@@ -103,10 +103,9 @@
void imem_init(void)
{
- default_pool = pool_create("Default pool", 4096, TRUE);
+ default_pool = system_pool;
}
void imem_deinit(void)
{
- pool_unref(default_pool);
}
Index: mempool-alloconly.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/mempool-alloconly.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mempool-alloconly.c 19 Dec 2002 01:02:35 -0000 1.11
+++ mempool-alloconly.c 21 Dec 2002 13:08:49 -0000 1.12
@@ -91,7 +91,7 @@
pool_alloconly_clear
};
-Pool _pool_alloconly_create(const char *name, size_t size)
+Pool pool_alloconly_create(const char *name, size_t size)
{
AlloconlyPool *apool;
int len;
Index: mempool.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/mempool.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- mempool.h 2 Dec 2002 13:45:58 -0000 1.5
+++ mempool.h 21 Dec 2002 13:08:49 -0000 1.6
@@ -34,9 +34,9 @@
/* memory allocated from data_stack is valid only until next t_pop() call. */
extern Pool data_stack_pool;
-/* If allocfree is FALSE, p_free() has no effect. Note that `size' specifies
- the initial malloc()ed block size, part of it is used internally. */
-Pool pool_create(const char *name, size_t size, int allocfree);
+/* Create a new alloc-only pool. Note that `size' specifies the initial
+ malloc()ed block size, part of it is used internally. */
+Pool pool_alloconly_create(const char *name, size_t size);
/* Pools should be used through these macros: */
#define pool_ref(pool) (pool)->ref(pool)
@@ -65,7 +65,5 @@
#else
# define p_free_clean(pool, mem)
#endif
-
-Pool _pool_alloconly_create(const char *name, size_t size);
#endif
--- mempool.c DELETED ---
More information about the dovecot-cvs
mailing list