public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Malloc failed in env_relocate
Date: Mon, 3 Dec 2007 10:03:39 +0100	[thread overview]
Message-ID: <20071203090339.GA9422@game.jcrosoft.org> (raw)
In-Reply-To: <20071203081801.18136.qmail@webmail7.rediffmail.com>

On 08:18 Mon 03 Dec     , Ashish Ranjan wrote:
>  ?
> Hi
> I am using u-boot-1.1.5 on MIPS32 core SoC. I am getting NULL pointer as return value of malloc from env_relocate() function.
> 
> while debugging in mem_malloc_init() I come to know that mem_malloc_start= 0x81f80000 and mem_malloc_end=0xFFFFFFFF. But when i checked both the values in sbrk() which is called from malloc() i got mem_malloc_start=0xFFFFFFFF and mem_malloc_end=0xFFFFFFFF.
> 
> How it happened ?? It may be the reason for getting NULL pointer. Please help me out.
> 
> One more thing what should be the value of gd->reloc_off at mem_malloc_init().because in mem_malloc_init, mem_malloc_end = CFG_MONITOR_BASE + gd->relo_off and CFG_MONITOR_BASE is base address of Flash. In my case gd-relo_off=0xc23c0000 and CFG_MONITOR_BASE=0xBFC00000 so mem_alloc_end should be 0x181FC0000 but it is of 4byte so here is overflow and it become 0xFFFFFFFF.Is there anything wrong??

Please upgrade your u-boot to the last release 1.3.0


Best Regards,
J.

      reply	other threads:[~2007-12-03  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03  8:18 [U-Boot-Users] Malloc failed in env_relocate Ashish Ranjan
2007-12-03  9:03 ` Jean-Christophe PLAGNIOL-VILLARD [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071203090339.GA9422@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox