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

RE: Thread-local malloc discussion summary



Is there a way for the front-end to detect that any plugins actually exist,
first? I'm already seeing a 10% difference in performance between SLAPI and
non-SLAPI compiles, even though I have no SLAPI plugins. Anyway, if we can
tell in advance that there are no SLAPI plugins in effect for this operation,
that would allow us to work around it at runtime.

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

> -----Original Message-----
> From: Luke Howard [mailto:lukeh@PADL.COM]
> Sent: Thursday, April 10, 2003 9:20 PM
> To: lukeh@PADL.COM
> Cc: hyc@highlandsun.com; jongchoi@us.ibm.com;
> openldap-devel@OpenLDAP.org
> Subject: RE: Thread-local malloc discussion summary
>
>
>
> Actually, a less drastic and completely API/ABI compatible fix is to
> use ch_malloc() just for the filter, but use TL-malloc for everything
> else it is being used for at present...
>
> Does this look OK?
>
> #ifdef LDAP_SLAPI
>     /* Don't use thread-local malloc() */
>     ch_op = *op; /* struct copy */
>     ch_op.o_tmpmemctx = NULL;
>     ch_op.o_tmpmfuncs = &ch_mfuncs;
>     rs->sr_err = get_filter( &ch_op, op->o_ber,
> &op->ors_filter, &rs->sr_text );
> #else
>     rs->sr_err = get_filter( op, op->o_ber, &op->ors_filter,
> &rs->sr_text );
> #endif
>
> -- Luke
>
> --
> Luke Howard | PADL Software Pty Ltd | www.padl.com
>