Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Eviction Algorithm APIs

Functions

struct z_page_frame * k_mem_paging_eviction_select (bool *dirty)
 
void k_mem_paging_eviction_init (void)
 

Detailed Description

Eviction algorithm APIs

Function Documentation

◆ k_mem_paging_eviction_init()

void k_mem_paging_eviction_init ( void  )

#include <include/sys/mem_manage.h>

Initialization function

Called at POST_KERNEL to perform any necessary initialization tasks for the eviction algorithm. k_mem_paging_eviction_select() is guaranteed to never be called until this has returned, and this will only be called once.

◆ k_mem_paging_eviction_select()

struct z_page_frame * k_mem_paging_eviction_select ( bool dirty)

#include <include/sys/mem_manage.h>

Select a page frame for eviction

The kernel will invoke this to choose a page frame to evict if there are no free page frames.

This function will never be called before the initial k_mem_paging_eviction_init().

This function is invoked with interrupts locked.

Parameters
[out]dirtyWhether the page to evict is dirty
Returns
The page frame to evict