Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Memory Management

Memory Management. More...

Modules

 Memory Banks Driver APIs
 Memory Banks Driver APIs.
 
 Memory Blocks APIs
 
 Memory Management Driver APIs
 Memory Management Driver APIs.
 

Functions

bool sys_mm_is_phys_addr_in_range (uintptr_t phys)
 Check if a physical address is within range of physical memory.
 
bool sys_mm_is_virt_addr_in_range (void *virt)
 Check if a virtual address is within range of virtual memory.
 

Detailed Description

Memory Management.

Function Documentation

◆ sys_mm_is_phys_addr_in_range()

bool sys_mm_is_phys_addr_in_range ( uintptr_t  phys)

#include <zephyr/sys/mem_manage.h>

Check if a physical address is within range of physical memory.

This checks if the physical address (virt) is within permissible range, e.g. between :kconfig:option:CONFIG_SRAM_BASE_ADDRESS and (:kconfig:option:CONFIG_SRAM_BASE_ADDRESS + :kconfig:option:CONFIG_SRAM_SIZE).

Note
Only used if :kconfig:option:CONFIG_KERNEL_VM_USE_CUSTOM_MEM_RANGE_CHECK is enabled.
Parameters
physPhysical address to be checked.
Returns
True if physical address is within range, false if not.

◆ sys_mm_is_virt_addr_in_range()

bool sys_mm_is_virt_addr_in_range ( void *  virt)

#include <zephyr/sys/mem_manage.h>

Check if a virtual address is within range of virtual memory.

This checks if the virtual address (virt) is within permissible range, e.g. between :kconfig:option:CONFIG_KERNEL_VM_BASE and (:kconfig:option:CONFIG_KERNEL_VM_BASE + :kconfig:option:CONFIG_KERNEL_VM_SIZE).

Note
Only used if :kconfig:option:CONFIG_KERNEL_VM_USE_CUSTOM_MEM_RANGE_CHECK is enabled.
Parameters
virtVirtual address to be checked.
Returns
True if virtual address is within range, false if not.