You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/04/06 18:51:46 UTC
[incubator-nuttx-apps] 02/03: testing/mm: check alignment in do_memaligns
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit f9a24e3c0a4d0d4b346e82161057b8dfa38fb40b
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Apr 6 18:40:09 2022 +0900
testing/mm: check alignment in do_memaligns
---
testing/mm/mm_main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/testing/mm/mm_main.c b/testing/mm/mm_main.c
index 0c064e376..462d9c321 100644
--- a/testing/mm/mm_main.c
+++ b/testing/mm/mm_main.c
@@ -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]);
}