summaryrefslogtreecommitdiff
path: root/memory
diff options
context:
space:
mode:
authorstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-07-04 15:04:42 +0000
committerstriker <striker@13f79535-47bb-0310-9956-ffa450edef68>2002-07-04 15:04:42 +0000
commit70ec865ce8cd0001095219605e141ef42f39a6e9 (patch)
treee45e783d4fdd5bd241142ffb4bc31e34286b2a0c /memory
parent66b49fe8b55c6aa6119abb72c66e91b08ee4977e (diff)
downloadlibapr-70ec865ce8cd0001095219605e141ef42f39a6e9.tar.gz
Introduce a new symbolic constant, effectively eliminating a magic
number. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63563 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r--memory/unix/apr_pools.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 31a1ef7c9..cddd1b987 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -119,6 +119,7 @@ APR_DECLARE(apr_status_t) apr_allocator_create(apr_allocator_t **allocator)
return APR_ENOMEM;
memset(new_allocator, 0, SIZEOF_ALLOCATOR_T);
+ new_allocator->max_free_index = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
*allocator = new_allocator;
@@ -351,7 +352,8 @@ void allocator_free(apr_allocator_t *allocator, apr_memnode_t *node)
next = node->next;
index = node->index;
- if (max_free_index != 0 && index > current_free_index) {
+ if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
+ && index > current_free_index) {
node->next = freelist;
freelist = node;
}
@@ -404,6 +406,7 @@ APR_DECLARE(void) apr_allocator_free(apr_allocator_t *allocator,
}
+
/*
* Debug level
*/