[wsf-c-dev] Memory management
James Clark
james at wso2.com
Wed Dec 13 17:05:15 PST 2006
On Wed, 2006-12-13 at 22:33 +0600, Samisa Abeysinghe wrote:
> James Clark wrote:
> > I can see two kinds of solution:
> >
> > a) C++ destructors (and overloading operator= etc)
> > b) Apache-style pools
> >
> Are we planning to write our own pool mechanism, or would we allow
> plugging something like APR, in case we go for option b)?
I would want to make our pools be an interface, so that we could plug in
whatever implementation we want. APR pools might be (the basis of) one
possible implementation. At this point, I don't know whether the
semantics of our pools will be exactly the same as APR pools, so I'm not
sure whether that will work. In any case, a pool implementation isn't a
big deal.
Ideally, I would like to have two levels of pluggability:
- be able to plug in a pool implementation -- this would be useful for
Apache
- be able to plug in an allocator implementation (with simple
malloc/free semantics) and use a pool implementation (possibly based on
APR pools) provided by us on top of that; this would be useful for
applications that use malloc/free allocation instead of pool-style
allocation
James
More information about the Wsf-c-dev
mailing list