You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by st...@apache.org on 2001/07/12 18:52:17 UTC
cvs commit: apr/memory/unix apr_sms_pools.c
striker 01/07/12 09:52:17
Modified: memory/unix apr_sms_pools.c
Log:
Changed the calls to apr_sms_trivial_create to apr_sms_trivial_create_ex
calls. This way we can set min_free to 0, which I did. Hopefully this
fixes the memory hunger httpd with pools as sms has.
Revision Changes Path
1.2 +14 -4 apr/memory/unix/apr_sms_pools.c
Index: apr_sms_pools.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_sms_pools.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_sms_pools.c 2001/07/11 14:20:09 1.1
+++ apr_sms_pools.c 2001/07/12 16:52:14 1.2
@@ -73,7 +73,8 @@
*/
return apr_sms_std_create(newpool);
- return apr_sms_trivial_create(newpool, p ? p : permanent_pool);
+ return apr_sms_trivial_create_ex(newpool, p ? p : permanent_pool,
+ 0x2000, 0, 0x80000);
}
APR_DECLARE(apr_pool_t *) apr_pool_sub_make(apr_pool_t * p,
@@ -118,14 +119,23 @@
APR_DECLARE(apr_status_t) apr_pool_alloc_init(apr_pool_t *gp)
{
+ apr_status_t rv;
+
+ if ((rv = apr_sms_trivial_create_ex(&permanent_pool, gp,
+ 0x2000, 0, 0x80000)) != APR_SUCCESS)
+ return rv;
+
initialized = 1;
- return apr_sms_trivial_create(&permanent_pool, gp);
+
+ return APR_SUCCESS;
}
APR_DECLARE(void) apr_pool_alloc_term(apr_pool_t *gp)
{
- apr_sms_destroy(permanent_pool);
- /* so, are we still initialized after this???? */
+ if (initialized)
+ apr_sms_destroy(permanent_pool);
+
+ initialized = 0;
}
APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)