[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Thread-local malloc discussion summary



> -----Original Message-----
> From: Luke Howard [mailto:lukeh@PADL.COM]

> The only way we can fix this without breaking API signatures is to
> change the semantics of the computed attribute search rewriter so
> that the front-end, rather than the plugin, is responsible for
> freeing the original search filter. Obviously this is problematic
> because only one plugin can rewrite the search filter without
> leaking memory.
>
> Another alternative would be to disable the thread-local malloc
> entirely if SLAPI was enabled. We would prefer this. Comments?

I've modified ch_free (and ch_realloc) to test the pointer argument and pass
it off to sl_free (and sl_realloc) if necessary. This gives some freedom from
mismatch problems, and with the new ldap_pvt_thread_pool_context() function
this solution doesn't cost much. So I'm going to revert the SLAPI filter
patches to slapd/search.c, I think it should be safe.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support