Message ID | 1415842036-28471-25-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
On Wed, Nov 12, 2014 at 06:27:10PM -0700, Simon Glass wrote: > From: Thierry Reding <treding@nvidia.com> > > When DEBUG is set, output memory region used for malloc(). > > Signed-off-by: Thierry Reding <treding@nvidia.com> > Acked-by: Simon Glass <sjg@chromium.org> > Signed-off-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks!
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index d87834d..991229d 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1533,6 +1533,9 @@ void mem_malloc_init(ulong start, ulong size) mem_malloc_end = start + size; mem_malloc_brk = start; + debug("using memory %#lx-%#lx for malloc()\n", mem_malloc_start, + mem_malloc_end); + memset((void *)mem_malloc_start, 0, size); malloc_bin_reloc();