diff options
author | Tom Rini <trini@konsulko.com> | 2015-10-21 20:47:40 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-10-21 20:47:40 -0400 |
commit | 858dbdf8412cefb6dbc4eed63dc3de9744578455 (patch) | |
tree | 7cca9f60b3d677b338defa3f4af74a1fff017071 /common/malloc_simple.c | |
parent | 89b5c81b75658b7ff66dea6c38a51dfecc9dd508 (diff) | |
parent | e0ae64880b61fdeaf261fddd747efa80fa53d386 (diff) |
Merge git://git.denx.de/u-boot-x86
Diffstat (limited to 'common/malloc_simple.c')
-rw-r--r-- | common/malloc_simple.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/malloc_simple.c b/common/malloc_simple.c index 9bf1fedd51..479a1e47b6 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -19,10 +19,13 @@ void *malloc_simple(size_t bytes) void *ptr; new_ptr = gd->malloc_ptr + bytes; + debug("%s: size=%zx, ptr=%lx, limit=%lx\n", __func__, bytes, new_ptr, + gd->malloc_limit); if (new_ptr > gd->malloc_limit) return NULL; ptr = map_sysmem(gd->malloc_base + gd->malloc_ptr, bytes); gd->malloc_ptr = ALIGN(new_ptr, sizeof(new_ptr)); + return ptr; } @@ -37,6 +40,7 @@ void *memalign_simple(size_t align, size_t bytes) return NULL; ptr = map_sysmem(addr, bytes); gd->malloc_ptr = ALIGN(new_ptr, sizeof(new_ptr)); + return ptr; } |