On Mar 17, 4:57 am, Trond Norbye <[email protected]> wrote: > The issue: Memcached eats memory unnecesarily > I downgraded the issue from medium to low (and from defect to RFE). For > all details, see:http://code.google.com/p/memcached/issues/detail?id=14 > > Proposed patch with test > case:http://github.com/trondn/memcached/commit/83da85eca91c3dd9777f1479e7d...
I had started something similar, but began by factoring out the LRU search so that I could reuse the loop and make that function smaller. I never got to the point where I *liked* what I was doing on the first search, but I like what yours does. If nobody objects, I'd like to take this. There are a couple of things I'd like to do with it in the future, though: 1) Make both of the depths configurable (e.g. 0 would disable a search). 2) Try to get these refactored into an isolated function. One nice thing about the depth configuration is that -M would just need to set LRU search depth to 0.
