Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
mempool_heap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_MEMPOOL_HEAP_H_
7#define ZEPHYR_INCLUDE_MEMPOOL_HEAP_H_
8
9/* Compatibility implementation of a k_mem_pool backend in terms of a
10 * k_heap
11 */
12
13/* The "ID" of a k_heap-based mempool is just the tuple of the data
14 * block pointer and the heap that allocated it
15 */
17 void *data;
18 struct k_heap *heap;
19};
20
21/* Note the data pointer gets unioned with the same value stored in
22 * the ID field to save space.
23 */
25 union {
26 void *data;
28 };
29};
30
31#endif /* ZEPHYR_INCLUDE_MEMPOOL_HEAP_H_ */
Definition: kernel.h:5088
Definition: mempool_heap.h:16
struct k_heap * heap
Definition: mempool_heap.h:18
void * data
Definition: mempool_heap.h:17
Definition: mempool_heap.h:24
struct k_mem_block_id id
Definition: mempool_heap.h:27
void * data
Definition: mempool_heap.h:26