You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by mt...@apache.org on 2009/04/02 19:04:06 UTC
svn commit: r761345 - /apr/apr/branches/1.4.x/memory/unix/apr_pools.c
Author: mturk
Date: Thu Apr 2 17:04:06 2009
New Revision: 761345
URL: http://svn.apache.org/viewvc?rev=761345&view=rev
Log:
Use the free_cleanup list for both post and pre cleanup lists
Modified:
apr/apr/branches/1.4.x/memory/unix/apr_pools.c
Modified: apr/apr/branches/1.4.x/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/memory/unix/apr_pools.c?rev=761345&r1=761344&r2=761345&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/memory/unix/apr_pools.c (original)
+++ apr/apr/branches/1.4.x/memory/unix/apr_pools.c Thu Apr 2 17:04:06 2009
@@ -502,7 +502,6 @@
apr_os_proc_t owner_proc;
#endif /* defined(NETWARE) */
cleanup_t *pre_cleanups;
- cleanup_t *free_pre_cleanups;
};
#define SIZEOF_POOL_T APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
@@ -719,7 +718,6 @@
/* Run pre destroy cleanups */
run_cleanups(&pool->pre_cleanups);
pool->pre_cleanups = NULL;
- pool->free_pre_cleanups = NULL;
/* Destroy the subpools. The subpools will detach themselves from
* this pool thus this loop is safe and easy.
@@ -762,7 +760,6 @@
/* Run pre destroy cleanups */
run_cleanups(&pool->pre_cleanups);
pool->pre_cleanups = NULL;
- pool->free_pre_cleanups = NULL;
/* Destroy the subpools. The subpools will detach themselve from
* this pool thus this loop is safe and easy.
@@ -869,7 +866,6 @@
pool->cleanups = NULL;
pool->free_cleanups = NULL;
pool->pre_cleanups = NULL;
- pool->free_pre_cleanups = NULL;
pool->subprocesses = NULL;
pool->user_data = NULL;
pool->tag = NULL;
@@ -959,7 +955,6 @@
pool->cleanups = NULL;
pool->free_cleanups = NULL;
pool->pre_cleanups = NULL;
- pool->free_pre_cleanups = NULL;
pool->subprocesses = NULL;
pool->user_data = NULL;
pool->tag = NULL;
@@ -1495,7 +1490,6 @@
/* Run pre destroy cleanups */
run_cleanups(&pool->pre_cleanups);
pool->pre_cleanups = NULL;
- pool->free_pre_cleanups = NULL;
/* Destroy the subpools. The subpools will detach themselves from
* this pool thus this loop is safe and easy.
@@ -2189,10 +2183,10 @@
#endif /* APR_POOL_DEBUG */
if (p != NULL) {
- if (p->free_pre_cleanups) {
+ if (p->free_cleanups) {
/* reuse a cleanup structure */
- c = p->free_pre_cleanups;
- p->free_pre_cleanups = c->next;
+ c = p->free_cleanups;
+ p->free_cleanups = c->next;
} else {
c = apr_palloc(p, sizeof(cleanup_t));
}
@@ -2255,8 +2249,8 @@
if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {
*lastp = c->next;
/* move to freelist */
- c->next = p->free_pre_cleanups;
- p->free_pre_cleanups = c;
+ c->next = p->free_cleanups;
+ p->free_cleanups = c;
break;
}