Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Functions | |
K_MEM_SLAB_DEFINE (kmslab, 16, 3, 8) | |
void | tmslab_alloc_free (void *data) |
static void | tmslab_alloc_align (void *data) |
static void | tmslab_alloc_timeout (void *data) |
static void | tmslab_used_get (void *data) |
void | test_mslab_kinit (void) |
Initialize the memory slab using k_mem_slab_init() and allocates/frees blocks. More... | |
void | test_mslab_kdefine (void) |
Verify K_MEM_SLAB_DEFINE() with allocates/frees blocks. More... | |
void | test_mslab_alloc_free_thread (void) |
Verify alloc and free of blocks from mem_slab. More... | |
void | test_mslab_alloc_align (void) |
Allocate memory blocks and check for alignment of 8 bytes. More... | |
void | test_mslab_alloc_timeout (void) |
Verify allocation of memory blocks with timeouts. More... | |
void | test_mslab_used_get (void) |
Verify count of allocated blocks. More... | |
Variables | |
static char | tslab [16 *3] |
static struct k_mem_slab | mslab |
K_MEM_SLAB_DEFINE | ( | kmslab | , |
16 | , | ||
3 | , | ||
8 | |||
) |
TESTPOINT: Statically define and initialize a memory slab
TESTPOINT: To ensure that each memory block is similarly aligned to this boundary
TESTPOINT: The memory slab's buffer contains slab_num_blocks memory blocks that are slab_block_size bytes long.
TESTPOINT: Allocate memory from a memory slab.
TESTPOINT:
0 | Memory allocated. |
TESTPOINT: The block address area pointed at by mem is set to the starting address of the memory block.
TESTPOINT: Free memory allocated from a memory slab.
TESTPOINT: Use K_NO_WAIT to return without waiting
TESTPOINT: -ENOMEM Returned without waiting.
TESTPOINT: -EAGAIN Waiting period timed out
TESTPOINT: timeout Maximum time to wait for operation to complete (in milliseconds)
TESTPOINT: Get the number of used blocks in a memory slab.
TESTPOINT: Get the number of unused blocks in a memory slab.
|
static |
|
static |