svn commit: r359407 - head/stand/libsa

Toomas Soome tsoome at FreeBSD.org
Sat Mar 28 21:47:54 UTC 2020


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
 #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__)


More information about the svn-src-head mailing list