[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-713-g7a911b3

Rafal Szczesniak mimir at samba.org
Tue Dec 18 20:53:44 GMT 2007


On Tue, Dec 18, 2007 at 12:27:32PM +0100, Volker Lendecke wrote:
> The reasons why I chose not to use memory-based tdbs for this
> data structure are different ones though. First I found it
> simply a bit silly to implement our own memory management
> when malloc is around and hopefully heavily optimized.
> Second, even after thinking about this for really long I
> could not find a way to implement something close to a LRU
> scheme inside tdb. The problem is that I can't really use
> pointers, tdb shuffles data around. So within tdb I would
> have to work with tdb keys to fake a doubly linked list and
> this would have involved much more memory usage in
> particular for the statcache where the keys are typically
> longer than the 4 or 8 bytes for a pointer.

Agreed. I didn't propose using memory-based tdb. It would not
allow you the required degree of control.

> But I would be happy to see a common API between the two,
> potentially based upon something similar to the dbwrap API
> with function pointers off the cache struct.

That's what I was actually thinking about. Common API with different,
let's say "backend", for data storage.

> Are you willing to do this?

Well, I could. However, I'd have to know more about how do you
want to operate on cache entries to be certain that current API
is enough to support both caches.

Rafal Szczesniak
Samba Team member   http://www.samba.org
Likewise Software   http://www.likewisesoftware.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20071218/5a2211fd/attachment.bin

More information about the samba-technical mailing list