Skip to content

Commit

Permalink
Fix #1412, Wrong memory alignment calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-kue committed Sep 11, 2023
1 parent dc548b7 commit 7e1ffbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unit-test-coverage/ut-stubs/src/libc-stdlib-stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void *OCS_malloc(size_t sz)
return NULL;
}

NextSize = (NextSize + MPOOL_ALIGN - 1) & ~((size_t)MPOOL_ALIGN);
NextSize = (NextSize + MPOOL_ALIGN - 1) & ~((cpuaddr)MPOOL_ALIGN - 1);
NextBlock = Rec->BlockAddr + MPOOL_ALIGN;
Rec->BlockAddr += NextSize;
Rec->Size += NextSize;
Expand Down

0 comments on commit 7e1ffbb

Please sign in to comment.