Zephyr API 3.6.99
Loading...
Searching...
No Matches
mm_drv_bank.h File Reference

Memory Banks Driver APIs. More...

#include <zephyr/kernel.h>
#include <zephyr/sys/mem_stats.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  sys_mm_drv_bank
 Information about memory banks. More...
 

Functions

void sys_mm_drv_bank_init (struct sys_mm_drv_bank *bank, uint32_t bank_pages)
 Initialize a memory bank's data structure.
 
uint32_t sys_mm_drv_bank_page_mapped (struct sys_mm_drv_bank *bank)
 Track the mapping of a page in the specified memory bank.
 
uint32_t sys_mm_drv_bank_page_unmapped (struct sys_mm_drv_bank *bank)
 Track the unmapping of a page in the specified memory bank.
 
void sys_mm_drv_bank_stats_reset_max (struct sys_mm_drv_bank *bank)
 Reset the max number of pages mapped in the bank.
 
void sys_mm_drv_bank_stats_get (struct sys_mm_drv_bank *bank, struct sys_memory_stats *stats)
 Retrieve the memory usage stats for the specified memory bank.
 

Detailed Description

Memory Banks Driver APIs.

This contains generic APIs to be used by a system-wide memory management driver to track page usage within memory banks.

Note
The caller of these functions needs to ensure proper locking to protect the data when using these APIs.