mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
buflib: add a common dummy callbacks struct & use it
There are various allocations that can't be moved or shrunk. Provide a global callback struct for this use case instead of making each caller declare its own dummy struct. Also fixed ROLO and x1000 installer code which incorrectly used movable allocations. Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1
This commit is contained in:
parent
95dfc489b5
commit
e8faf2f2ad
14 changed files with 43 additions and 30 deletions
|
|
@ -148,7 +148,7 @@ static int updater_init(struct updater* u)
|
|||
|
||||
/* buf_len is a bit oversized here, but it's not really important */
|
||||
u->buf_len = u->img_len + sizeof(mtar_t) + 2*CACHEALIGN_SIZE;
|
||||
u->buf_hnd = core_alloc("boot_image", u->buf_len);
|
||||
u->buf_hnd = core_alloc_ex("boot_image", u->buf_len, &buflib_ops_locked);
|
||||
if(u->buf_hnd < 0) {
|
||||
rc = IERR_OUT_OF_MEMORY;
|
||||
goto error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue