Greg Hudson <ghudson@MIT.EDU> writes:
> On Sun, 2004-03-14 at 12:52, Philip Martin wrote:
>> Because editor->delete_entry allocates a non-trivial amount of memory
>> and using a subpool allows that memory to be deallocated.
>
> But "pool" is already a per-command subpool (whereas entry->pool is only
> a per-directory subpool).
This was my test case
#!/bin/bash
REPO=svn://localhost/repo
rm -rf repo wc
svnadmin create --bdb-txn-nosync repo
echo [general] >> repo/conf/svnserve.conf
echo anon-access = write >> repo/conf/svnserve.conf
svn co $REPO wc
svn mkdir wc/bar
for i in `seq 100 400`;do touch wc/bar/foo$i;done
svn add wc/bar/*
svn ci wc -m ""
svn rm wc/bar
svn revert wc/bar
svn ci wc -m "" # this commit caused svnserve to use lots of memory
You are correct, using pool also solves the memory use problem. I'll
commit this
Index: subversion/libsvn_ra_svn/editorp.c
===================================================================
--- subversion/libsvn_ra_svn/editorp.c (revision 9033)
+++ subversion/libsvn_ra_svn/editorp.c (working copy)
@@ -446,13 +446,10 @@
const char *path, *token;
svn_revnum_t rev;
ra_svn_token_entry_t *entry;
- apr_pool_t *subpool;
SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)c", &path, &rev, &token));
SVN_ERR(lookup_token(ds, token, FALSE, &entry));
- subpool = svn_pool_create(entry->pool);
- SVN_CMD_ERR(ds->editor->delete_entry(path, rev, entry->baton, subpool));
- apr_pool_destroy(subpool);
+ SVN_CMD_ERR(ds->editor->delete_entry(path, rev, entry->baton, pool));
return SVN_NO_ERROR;
}
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 14 19:14:49 2004