From: Nishanth Menon Date: Fri, 18 Sep 2009 21:21:57 -0500 Subject: [U-Boot] [PATCH 5/6] DLMALLOC:!X86: add av_ initialization In-Reply-To: <1253326918-1670-5-git-send-email-nm@ti.com> References: <1253326918-1670-1-git-send-email-nm@ti.com> <1253326918-1670-2-git-send-email-nm@ti.com> <1253326918-1670-3-git-send-email-nm@ti.com> <1253326918-1670-4-git-send-email-nm@ti.com> <1253326918-1670-5-git-send-email-nm@ti.com> Message-ID: <1253326918-1670-6-git-send-email-nm@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This is questionable if this is really required as the av_ static initalized values should have been loaded to sdram as part of the boot process and initialization should have been done. Signed-off-by: Nishanth Menon --- common/dlmalloc.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 241db8c..bd509db 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1527,6 +1527,11 @@ void *sbrk(ptrdiff_t increment) */ void mem_malloc_init(ulong start, ulong size) { + u8 i; + av_[0] = av_[1] = 0; + for (i = 0; i < 128; i++) + av_[2 + i * 2] = av_[2 + i * 2 + 1] = bin_at(i); + mem_malloc_start = start; mem_malloc_end = start + size; mem_malloc_brk = start; -- 1.6.0.4