bus-02-memory/projects/bus/bus-02-memory/mmem_lru_aging.h
2026-05-31 23:50:47 +02:00

45 lines
No EOL
1 KiB
C

#ifndef MMEM_LRU_AGING_H__
#define MMEM_LRU_AGING_H__
// You do not need to change anything here
#include "mmem.h"
#include <stdlib.h>
/**
* \brief Initializes the list with the page frames
*
* \return Returns a pointer to the created memory struct
*/
memory* stud_lrua_init_list();
/**
* \brief maps a page to a page frame
*
* \param mem - the memory struct in which the page should be mapped in
* \param virtual_address - the virtual address of the page
*/
void stud_lrua_map_page(memory* mem, uint64_t virtual_address);
/**
* \brief function is called, when a page is accessed
* The page that is accessed may or may not be in a page frame
*
* \param virtual_address - the virtual address of the page
* \param mem - the memory struct in which the page should be accessed
*/
void stud_lrua_access_page(memory* mem, uint64_t virtual_address);
/**
* \brief function is called, when the clock is advanced
*
* \param mem - the memory struct on which the algorithm operates on
*/
void stud_lrua_clock_tick(memory* mem);
#endif