From: Andrew F. Davis <afd@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/3] malloc_simple: Add debug statements to memalign_simple
Date: Sun, 22 Jan 2017 16:19:35 -0600 [thread overview]
Message-ID: <20170122221937.5868-2-afd@ti.com> (raw)
In-Reply-To: <20170122221937.5868-1-afd@ti.com>
Add debug statements to memalign_simple to match malloc_simple.
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
common/malloc_simple.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index 0f6bcbcc71..611400265b 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -39,10 +39,14 @@ void *memalign_simple(size_t align, size_t bytes)
addr = ALIGN(gd->malloc_base + gd->malloc_ptr, align);
new_ptr = addr + bytes - gd->malloc_base;
- if (new_ptr > gd->malloc_limit)
+ if (new_ptr > gd->malloc_limit) {
+ debug("space exhausted\n");
return NULL;
+ }
+
ptr = map_sysmem(addr, bytes);
gd->malloc_ptr = ALIGN(new_ptr, sizeof(new_ptr));
+ debug("%lx\n", (ulong)ptr);
return ptr;
}
--
2.11.0
next prev parent reply other threads:[~2017-01-22 22:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-22 22:19 [U-Boot] [PATCH v3 0/3] Add a config for AM335x High Security EVM Andrew F. Davis
2017-01-22 22:19 ` Andrew F. Davis [this message]
2017-01-23 3:12 ` [U-Boot] [PATCH v3 1/3] malloc_simple: Add debug statements to memalign_simple Tom Rini
2017-01-23 4:17 ` Lokesh Vutla
2017-01-22 22:19 ` [U-Boot] [PATCH v3 2/3] spl: Remove overwrite of relocated malloc limit Andrew F. Davis
2017-01-23 3:11 ` Tom Rini
2017-01-22 22:19 ` [U-Boot] [PATCH v3 3/3] defconfig: Add a config for AM335x High Security EVM Andrew F. Davis
2017-01-23 4:17 ` Lokesh Vutla
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=20170122221937.5868-2-afd@ti.com \
--to=afd@ti.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