リビジョン | 65c9dfdcb9aacf837e495c55e4db53d2fb176c68 (tree) |
---|---|
日時 | 2016-04-17 19:24:47 |
作者 | Yoshinori Sato <ysato@user...> |
コミッター | Yoshinori Sato |
malloc_simple: Add debug print.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -38,11 +38,14 @@ void *memalign_simple(size_t align, size_t bytes) | ||
38 | 38 | void *ptr; |
39 | 39 | |
40 | 40 | addr = ALIGN(gd->malloc_base + gd->malloc_ptr, align); |
41 | + debug("%s: size=%zx, addr=%lx, limit=%lx: ", __func__, bytes, addr, | |
42 | + gd->malloc_limit); | |
41 | 43 | new_ptr = addr + bytes - gd->malloc_base; |
42 | 44 | if (new_ptr > gd->malloc_limit) |
43 | 45 | return NULL; |
44 | 46 | ptr = map_sysmem(addr, bytes); |
45 | 47 | gd->malloc_ptr = ALIGN(new_ptr, sizeof(new_ptr)); |
48 | + debug("%lx\n", (ulong)ptr); | |
46 | 49 | |
47 | 50 | return ptr; |
48 | 51 | } |