Date: Sat, 28 Mar 2020 17:10:28 -0600 From: Warner Losh <imp@bsdimp.com> To: Toomas Soome <tsoome@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head@freebsd.org Subject: Re: svn commit: r359407 - head/stand/libsa Message-ID: <CANCZdfrMifZYVR9FWuoZqjqnQi7xESLJNrQ0s2xQoBreFR=P4A@mail.gmail.com> In-Reply-To: <202003282147.02SLljCo067522@repo.freebsd.org> References: <202003282147.02SLljCo067522@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 28, 2020, 3:49 PM Toomas Soome <tsoome@freebsd.org> wrote: > Author: tsoome > Date: Sat Mar 28 21:47:44 2020 > New Revision: 359407 > URL: https://svnweb.freebsd.org/changeset/base/359407 > > Log: > loader: add knob to build with user malloc > > This option is intended to aid development, to allow building with user > malloc. > The use case would be to build userboot & test with libc (or other) > malloc and > use extra malloc debug features. > > Modified: > head/stand/libsa/stand.h > > Modified: head/stand/libsa/stand.h > > ============================================================================== > --- head/stand/libsa/stand.h Sat Mar 28 20:43:15 2020 (r359406) > +++ head/stand/libsa/stand.h Sat Mar 28 21:47:44 2020 (r359407) > @@ -436,7 +436,14 @@ extern void mallocstats(void); > > const char *x86_hypervisor(void); > > -#ifdef DEBUG_MALLOC > +#ifdef USER_MALLOC > +extern void *malloc(size_t); > +extern void *memalign(size_t, size_t); > +extern void *calloc(size_t, size_t); > +extern void free(void *); > +extern void *realloc(void *, size_t); > +extern void *reallocf(void *, size_t); > +#elif DEBUG_MALLOC > This is missing a defined(). Warner > #define malloc(x) Malloc(x, __FILE__, __LINE__) > #define memalign(x, y) Memalign(x, y, __FILE__, __LINE__) > #define calloc(x, y) Calloc(x, y, __FILE__, __LINE__) >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrMifZYVR9FWuoZqjqnQi7xESLJNrQ0s2xQoBreFR=P4A>