cvs commit: src/lib/libc/stdlib malloc.c
John Baldwin
jhb at freebsd.org
Fri Jan 27 13:41:11 PST 2006
On Thursday 26 January 2006 22:02, Jason Evans wrote:
> On Jan 26, 2006, at 6:51 PM, Andrey Chernov wrote:
> > I worry about my system performance. Could you please make all
> > statistics
> > and debug code conditional, debending on some flags which could be
> > set as
> > malloc options? Even in case this is a test period now, some people
> > perhaps don't want some tests. It is much easy to turn some tests
> > off via
> > malloc options than to comment out manually corresponding malloc.c
> > defines
> > after each cvsup.
>
> Unfortunately, run-time checks for the debugging features are
> expensive, since the debugging code is scattered throughout
> malloc.c. This pretty much mandates compile-time configuration, for
> performance reasons.
>
> I can disable statistics and debugging, if there's a general
> consensus to do so. How much performance difference is the debug/
> stats code making for you? I've only been disabling debug/stats for
> benchmarking purposes, so I don't have a good feel for how much it
> impacts overall system performance.
Perhaps you could add some Makefile foo so Andrey can just add some entries to
his /etc/make.conf (like NO_MALLOC_DEBUG, NO_MALLOC_STATS). This would give
Andrey what he needs w/o adding runtime overhead and w/o requiring Andrey to
hack the source each time.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the cvs-src
mailing list