Skip to content
Commit 80b9080f authored by Martin Åberg's avatar Martin Åberg Committed by Anas Nashif
Browse files

tests/mem_alloc: check that malloc() objects can be accessed



Adds tests checking that we can use memory allocated by malloc(),
calloc() and realloc() to access objects of some common types,
including uint64_t and double.

It works by doing a number of allocations of various sizes and
dereferencing the returned pointer. The purpose is to catch cases where
the application would trap if accessing the allocated memory. (The
test does not check alignment against the ABI or alignof().)

Signed-off-by: default avatarMartin Åberg <martin.aberg@gaisler.com>
parent 180ce491
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment