mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-05 22:12:40 +00:00
Merge git://git.denx.de/u-boot-x86
This commit is contained in:
commit
858dbdf841
207 changed files with 1726 additions and 752 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue