Re: [Sqlrelay-discussion] Sybase/Perl performance
Brought to you by:
mused
|
From: Claudio F. <kla...@gm...> - 2010-02-05 14:25:54
|
Ok, it turned out that only a very small patch to rudiments is enough. I'll
try to push it into rudiments, but in the meanwhile, just apply this patch
to your rudiments installation:
diff -wur rudiments-0.32.orig/src/memorypool.C
rudiments-0.32/src/memorypool.C
--- rudiments-0.32.orig/src/memorypool.C 2006-08-05 01:34:47.000000000
-0300
+++ rudiments-0.32/src/memorypool.C 2009-08-31 18:54:28.000000000 -0300
@@ -88,8 +88,11 @@
// if we didn't find a node with enough memory remaining,
// create a new one at the end of the list
if (!node) {
- memnode=new memorypoolnode((length>pvt->_increment)?
- length:pvt->_increment);
+ size_t incr = pvt->_increment;
+ size_t tot = pvt->_totalusedsize;
+ if (incr < (tot/10))
+ incr = (tot/10);
+ memnode=new memorypoolnode((length>incr)?length:incr);
pvt->_nodelist.append(memnode);
}
|