Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 59278 invoked by uid 500); 12 Apr 2000 00:42:47 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 59264 invoked from network); 12 Apr 2000 00:42:47 -0000 From: mja@trudge.engr.sgi.com (Mike Abbott) Message-Id: <200004120042.RAA34031@trudge.engr.sgi.com> Subject: pool vs. context To: new-httpd@apache.org Date: Tue, 11 Apr 2000 17:42:36 -0700 (PDT) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N The use of pools and contexts in 2.0 confuses me. There are distinct types (ap_pool_t, ap_context_t) and constructors/destructors (ap_make_sub_pool()/ap_destroy_pool(), ap_create_context()/ap_destroy_context()) but many variables are declared as ap_context_t and named "pool" (the first member of request_rec) or "p" (the "p" in all the ap_pXXX() function names and objects like "pglobal"). I understand that the "pool" concept is inherited from 1.3 and "contexts" are new in 2.0 but the split seems incomplete. Seems to me either all stale references to pools should be changed to contexts (e.g., ap_pstrdup() becomes ap_cstrdup()), or pools should become, say, "arenas" and contexts should switch back to being pools (so that ap_pstrdup(r->pool, ...) makes sense but ap_make_sub_pool() becomes ap_make_sub_arena()), or I need something explained to me. I think that, at a minimum, ap_clear_pool() should be renamed to ap_clear_context() since MPMs operate on contexts not pools: src/modules/mpm/dexter/dexter.c:863: ap_create_context(&ptrans, tpool); src/modules/mpm/dexter/dexter.c:979: ap_clear_pool(ptrans); -- Michael J. Abbott mja@sgi.com http://reality.sgi.com/mja/