httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@trudge.engr.sgi.com (Mike Abbott)
Subject pool vs. context
Date Wed, 12 Apr 2000 00:42:36 GMT
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/

Mime
View raw message