23 Nov
2011
23 Nov
'11
11:49 a.m.
Phil Mayers wrote:
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:
Yeah. Talloc would be nice. It's a lot more useful since they (a) split it out of Samba to be a stand-alone project, and (b) improved the performance to be something reasonable.
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.
It also means that memory allocations are more localized, which will likely help performance. Alan DeKok.