Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9f479813 authored by Sunil Khatri's avatar Sunil Khatri Committed by Hareesh Gundu
Browse files

genalloc: Correct nbytes calculation on long boundary



In existing code we calculate nbytes based on the byte
boundary, but genalloc uses bitmap for maintaining the
memory allocation aligned to long. So while calculating
nbytes we end up getting wrong nbytes.
example: lets say nbytes comes to 9 bytes for 70 bits when
bytes aligned,but if long aligned we will have 3 long words
i.e 12 bytes. This difference may lead to choosing the
wrong api for freeing the memory i.e Between kfree() and
vfree().

Change-Id: I942caf59e25515c780896b328b912604df9e10bf
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent ff2b0399
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment