mirror of https://github.com/thesofproject/sof.git
memory: fix wrong calculation of remaining free blocks
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com> This patch corrects the calculation of free blocks. Now, once we allocate all free space, the allocator will go beyond available space.
This commit is contained in:
parent
ed6ac05f6b
commit
8397684e85
|
@ -258,8 +258,7 @@ static void *alloc_cont_blocks(struct mm_heap *heap, int level,
|
|||
/* check if we have enough consecutive blocks for requested
|
||||
* allocation size.
|
||||
*/
|
||||
for (current = map->first_free; current < map->count ||
|
||||
count > remaining; current++) {
|
||||
for (current = map->first_free; current < map->count; current++) {
|
||||
hdr = &map->block[current];
|
||||
|
||||
if (!hdr->used)
|
||||
|
|
Loading…
Reference in New Issue