forked from len0rd/rockbox
PictureFlow: Add move callback for buflib allocations
If we don't provide a callback to buflib_alloc(), the buffer is always movable (to reduce fragmentation). Since we pass our buffer to functions that call yield(), this could lead to memory corruption on buflib compaction. Change-Id: Id1fad1822479d692551c55cb8bc87cea7b78f759
This commit is contained in:
parent
b0277e4b6d
commit
9076b433d1
2 changed files with 20 additions and 2 deletions
|
|
@ -677,7 +677,7 @@ buflib_free(struct buflib_context *ctx, int handle_num)
|
|||
else
|
||||
{
|
||||
/* Otherwise, set block to the newly-freed block, and mark it free, before
|
||||
* continuing on, since the code below exects block to point to a free
|
||||
* continuing on, since the code below expects block to point to a free
|
||||
* block which may have free space after it.
|
||||
*/
|
||||
block = freed_block;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue