diff mbox

[U-Boot,v3,9/9] sandbox: Always enable malloc debug

Message ID 1405052613-20987-10-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass July 11, 2014, 4:23 a.m. UTC
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@chromium.org>
---

Changes in v3: None
Changes in v2: None

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

Comments

Simon Glass July 26, 2014, 3:24 p.m. UTC | #1
On 11 July 2014 05:23, Simon Glass <sjg@chromium.org> wrote:
> 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@chromium.org>

Applied to dm/master.
diff mbox

Patch

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 ------------ */