1# Copyright (c) 2021,2023 Intel Corporation 2# 3# SPDX-License-Identifier: Apache-2.0 4 5menu "Memory Blocks" 6 7config SYS_MEM_BLOCKS 8 bool "(Yet Another) Memory Blocks Allocator" 9 help 10 This enables support for memory block allocator where: 11 () All memory blocks have a single fixed size. 12 () Multiple blocks can be allocated or freed at the same time. 13 () A group of blocks allocated together may not be contiguous. 14 This is useful for operations such as scatter-gather DMA 15 transfers. 16 () Bookkeeping of allocated blocks is done outside of 17 the associated buffer (unlike memory slab). This allows 18 the buffer to reside in memory regions where these can be 19 powered down to conserve energy. 20 21config SYS_MEM_BLOCKS_LISTENER 22 bool "Memory Blocks Allocator event notifications" 23 depends on SYS_MEM_BLOCKS 24 select HEAP_LISTENER 25 help 26 This allows application to listen for memory blocks allocator 27 events, such as memory allocation and de-allocation. 28 29config SYS_MEM_BLOCKS_RUNTIME_STATS 30 bool "Memory blocks runtime statistics" 31 depends on SYS_MEM_BLOCKS 32 help 33 This option enables the tracking and reporting of the memory 34 blocks statistics related to the current and maximum number 35 of allocations in a given memory block. 36 37config OBJ_CORE_SYS_MEM_BLOCKS 38 bool "Kernel object for memory blocks" 39 depends on SYS_MEM_BLOCKS && OBJ_CORE 40 default y if SYS_MEM_BLOCKS && OBJ_CORE 41 help 42 This option allows object cores to be integrated into memory block 43 objects. 44 45config OBJ_CORE_STATS_SYS_MEM_BLOCKS 46 bool "Object core statistics for memory blocks" 47 depends on SYS_MEM_BLOCKS && OBJ_CORE_STATS 48 default y if SYS_MEM_BLOCKS && OBJ_CORE_STATS 49 select SYS_MEM_BLOCKS_RUNTIME_STATS 50 help 51 This option integrates the object core statistics framework into 52 the memory blocks. 53 54endmenu 55