[Date Prev][Date Next]
I've just checked in a potential patch for ITS#3296.I don't think this is the right approach. The caller of the normalizer
should pass in a NULL tmpmemctx if permanent storage is desired.
The problem I found is that normalized values in many normalizers (including
that for UUID) are currently allocated by sl_malloc.
I think they should be allocated by using ch_malloc because they are stored
in entry and hence are permanent.
For the toggling feature, I'd rather track down the usages of sl_malloc()It is not meant to be a workaround at all, just a debugging aid when
searching for memory leaks. I guess it can be a compile-time option
instead, but I'd rather minimize the need for recompilation.
first if the toggling feature is not meant to be the first level solution
but a temp workaround.
I was actually thinking of adding a config keyword to enable/disable
sl_malloc, and replacing all the direct calls in the source with calls
thru the sl_mfuncs structure. Then most of its functionality can be
toggled just by changing that single structure. This would make testing
for memleaks a bit easier.
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
Symas: Premier OpenSource Development and Support