new mem-management for libsvn_fs?
From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-10-31 23:21:00 CET
I've been looking at issue #860, whereby we're still seeing waaaaay
The status quo isn't so hot. Here's how pools currently work:
* caller passes a pool to the fs.
* the pool is passed to retry_txn(), which uses it to create a trail.
* trail->pool becomes a subpool of the caller's main pool.
* the fs routines allocate both scratchwork and return-data in
==> lots of wasted memory.
In the proposed scheme, we require the separation of scratch-data from
* caller passes a pool to the fs.
* the pool is passed to retry_txn(), which uses it to create a trail.
* trail->pool becomes a subpool of the caller's main pool.
* every txn_body() routine changes signature:
* txn_body(baton, trail) ==> txn_body(baton, trail, returnpool)
* txn_body routines continue to let fs routines use trail->pool
* retry_txn() simply passes the main caller pool as the
* commit_txn() destroys trail->pool upon exit.
==> only return-data is preserved; all scratchwork is freed.
The real work here is going through every single txn_body_ routine,
Feedback?
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.