apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1100890 - in /apr/apr/branches/gstein-pocore: memory/unix/apr_pools.c tables/apr_hash.c
Date Mon, 09 May 2011 05:23:46 GMT
Author: gstein
Date: Mon May  9 05:23:45 2011
New Revision: 1100890

URL: http://svn.apache.org/viewvc?rev=1100890&view=rev
Log:
Minor updates to track changes in pocore: the "post" concept has been
removed in favor of just using subpools (which are very fast).

* memory/unix/apr_pools.c:
  (): always define USE_POCORE on the branch
  (struct apr_pool_t): remove the post and add STRUCTURE_POOL as a
    reference to the pool where we placed the apr_pool_t structure. It is
    also the owner of the actual pool used for all allocations.
  (apr_pool_clear): clear the pool rather than returning to the post
    marker. note: this clear the allocation pool, not the pool where we
    placed the structure.
  (apr_pool_destroy): destroy the structure pool, which also takes down
    the child allocation pool.
  (apr_pool_create_ex): adjust the setup of the pool structure, and create
    an extra pool for the allocations (distinct from where we placed the
    structure itself).

* tables/apr_hash.c:
  (): always define USE_POCORE on the branch

Modified:
    apr/apr/branches/gstein-pocore/memory/unix/apr_pools.c
    apr/apr/branches/gstein-pocore/tables/apr_hash.c

Modified: apr/apr/branches/gstein-pocore/memory/unix/apr_pools.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/gstein-pocore/memory/unix/apr_pools.c?rev=1100890&r1=1100889&r2=1100890&view=diff
==============================================================================
--- apr/apr/branches/gstein-pocore/memory/unix/apr_pools.c (original)
+++ apr/apr/branches/gstein-pocore/memory/unix/apr_pools.c Mon May  9 05:23:45 2011
@@ -31,7 +31,7 @@
 #include "apr_want.h"
 #include "apr_env.h"
 
-/*#define USE_POCORE*/
+#define USE_POCORE
 #ifdef USE_POCORE
 #include "pc_memory.h"
 #include "pc_misc.h"
@@ -478,7 +478,7 @@ struct debug_node_t {
 struct apr_pool_t {
 #ifdef USE_POCORE
     pc_pool_t *pcpool;
-    pc_post_t *post;
+    pc_pool_t *structure_pool;
 #else
     apr_pool_t           *parent;
     apr_pool_t           *child;
@@ -796,7 +796,7 @@ APR_DECLARE(void) apr_pool_clear(apr_poo
     pool->user_data = NULL;
 
 #ifdef USE_POCORE
-    pc_post_recall(pool->post);
+    pc_pool_clear(pool->pcpool);
 #else
     /* Find the node attached to the pool structure, reset it, make
      * it the active node and free the rest of the nodes.
@@ -843,7 +843,7 @@ APR_DECLARE(void) apr_pool_destroy(apr_p
     free_proc_chain(pool->subprocesses);
 
 #ifdef USE_POCORE
-    pc_pool_destroy(pool->pcpool);
+    pc_pool_destroy(pool->structure_pool);
 #else
     /* Remove the pool from the parents child list */
     if (pool->parent) {
@@ -933,12 +933,13 @@ APR_DECLARE(apr_status_t) apr_pool_creat
         }
 
         pool = pc_alloc(pcpool, sizeof(*pool));
-        pool->pcpool = pcpool;
+        pool->structure_pool = pcpool;
 
-        /* The APR pool is allocated within the PoCore pool. We don't want
-           to clear the pool and toss the APR pool. Set a post that we can
-           use for "clearing the [APR] pool".  */
-        pool->post = pc_post_create(pcpool);
+        /* ### ugh. in order to clear the pool, without destroying our
+           ### companion structure (*pool), we need to create a subpool
+           ### for the allocations. it would be nice if we could construct
+           ### pcpool as "small" rather than the default 8k ctx size.  */
+        pool->pcpool = pc_pool_create(pcpool);
     }
 #else
     if (allocator == NULL)

Modified: apr/apr/branches/gstein-pocore/tables/apr_hash.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/gstein-pocore/tables/apr_hash.c?rev=1100890&r1=1100889&r2=1100890&view=diff
==============================================================================
--- apr/apr/branches/gstein-pocore/tables/apr_hash.c (original)
+++ apr/apr/branches/gstein-pocore/tables/apr_hash.c Mon May  9 05:23:45 2011
@@ -32,7 +32,7 @@
 #include <stdio.h>
 #endif
 
-/*#define USE_POCORE*/
+#define USE_POCORE
 #ifdef USE_POCORE
 #include "pc_types.h"
 #include "pc_memory.h"



Mime
View raw message