httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dean gaudet <dgaudet-list-new-ht...@arctic.org>
Subject Re: Optimizing dir_merge()
Date Tue, 11 Sep 2001 03:54:58 GMT
On Wed, 15 Aug 2001, William A. Rowe, Jr. wrote:

>   . If the pool argument passed in merge_dir_configs doesn't match the base config,
>     it's out of scope!  You must copy when the pool argument differs from the base!
>
>   . Likewise, if you are changing parts of the add config, and the add config's pool
>     doesn't match the pool argument, that structure must be copied!

i really think we can tighten these up, and require the following:

    assert(p == apr_find_pool(addv));
    assert(apr_pool_is_ancestor(apr_find_pool(basev), apr_find_pool(addv)));

> In the future, the pool argument may also correspond to a cache pool, to pre-merge
> selected directory configurations.  If the base corresponds to a cached config, and
> the merge is requested for the request, the config will be copied if you follow the
> rules above.

i can see now why ref counts are interesting -- for the cached merged
results.  you'd have to modify the second assert above to take into
account cached results...  but it really shouldn't be hard.  and there
shouldn't be any need for ref counts on non cached stuff.  just keep the
ref count in the cache structure itself, and use a cleanup to decrement it
at the end of the request.

-dean


Mime
View raw message