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

RE: sl_malloc vs. malloc debuggers

> -----Original Message-----
> From: owner-openldap-devel@OpenLDAP.org
> [mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Hallvard B Furuseth

> Can every call to sl_malloc() & co be replaced with plain malloc()?
> If so, I suggest a configure option is added to turn off sl_malloc,
> so that malloc debuggers like Electric Fence can be more effective.

Are you looking for illegal overwrites and such?

Yes, you can replace it with regular malloc. I can see #ifdef'ing this but I
don't see a reason to enable this in the top-level configure script if it's
only for debugging purposes. Just recompile sl_malloc.c with -D<some_flag>...

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