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

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Dec 18 11:27:32 GMT 2007


On Tue, Dec 18, 2007 at 12:13:23PM +0100, Rafal Szczesniak wrote:
> Which is why I thought it might be useful to have an in-memory
> cache using the same api/mechanisms like gencache, but not employing
> tdb as the actual backend.

It is the file-based tdb that kills this for the information
leak issue.

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.

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.

Are you willing to do this?

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


More information about the samba-technical mailing list