testing/mm: check alignment in do_memaligns

This commit is contained in:
YAMAMOTO Takashi 2022-04-06 18:40:09 +09:00 committed by Xiang Xiao
parent cc5f73019e
commit f9a24e3c0a

View File

@ -256,6 +256,14 @@ static void do_memaligns(FAR void **mem,
}
else
{
if (((uintptr_t)mem[j] % align[i]) != 0)
{
fprintf(stderr,
" ERROR wrong alignment: ptr %p, alignment %d\n",
mem[j], align[i]);
exit(1);
}
memset(mem[j], 0x33, size[j]);
}