Changes to VALUE_PAIR structure

Phil Mayers p.mayers at imperial.ac.uk
Wed Nov 23 16:41:56 CET 2011


On 11/23/2011 01:40 PM, Alan DeKok wrote:

>    I don't see much point in trying to reduce the memory footprint any
> further.  What would help is allowing arbitrary length strings, but that
> requires changing a *lot* of code.

One thing I wondered about a while back was using a better allocator to 
help with things like this. In particular, "talloc" (GPL, small, used by 
samba) is very nice; you can do some clever things like:

ptr = talloc(ctx, 10);
sub = talloc(ptr, 10);
ptr == talloc_parent(sub); /* useful in some cases */
talloc_free(ptr); /* also frees sub */

You can "break" the link if you need to move blocks around etc.

Not sure if it would help with variable-length strings per se, but it 
might be preferable to using a dumb allocator if implementing it.



More information about the Freeradius-Devel mailing list