[U-Boot] [PATCH v2 9/9] sandbox: Always enable malloc debug

Simon Glass sjg at chromium.org
Tue Jul 8 01:19:28 CEST 2014


Tun on DEBUG in malloc(). This adds code space and slows things down but
for sandbox this is acceptable. We gain the ability to check for memory
leaks in tests.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 common/dlmalloc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 26ba8fd..f987339 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1,5 +1,9 @@
 #include <common.h>
 
+#ifdef CONFIG_SANDBOX
+#define DEBUG
+#endif
+
 #if 0	/* Moved to malloc.h */
 /* ---------- To make a malloc.h, start cutting here ------------ */
 
-- 
2.0.0.526.g5318336



More information about the U-Boot mailing list