Introduce page coloring support to memory manager
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include XTOS_ARCH_HEADER(mm, paging.hh)
|
||||
#include XTOS_ARCH_HEADER(mm, pte.hh)
|
||||
|
||||
#include <mm/colors.hh>
|
||||
#include <mm/hlpool.hh>
|
||||
#include <mm/kpool.hh>
|
||||
#include <mm/mmgr.hh>
|
||||
|
||||
35
xtoskrnl/includes/mm/colors.hh
Normal file
35
xtoskrnl/includes/mm/colors.hh
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/includes/mm/colors.hh
|
||||
* DESCRIPTION: Memory manager page coloring subsystem
|
||||
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __XTOSKRNL_MM_COLORS_HH
|
||||
#define __XTOSKRNL_MM_COLORS_HH
|
||||
|
||||
#include <xtos.hh>
|
||||
|
||||
|
||||
/* Memory Manager */
|
||||
namespace MM
|
||||
{
|
||||
class Colors
|
||||
{
|
||||
private:
|
||||
STATIC PMMCOLOR_TABLES FreePages[FreePageList + 1];
|
||||
STATIC ULONG PagingColors;
|
||||
STATIC ULONG PagingColorsMask;
|
||||
|
||||
public:
|
||||
STATIC XTAPI VOID ComputePageColoring(VOID);
|
||||
STATIC XTAPI PMMCOLOR_TABLES GetFreePages(MMPAGELISTS PageList,
|
||||
ULONG Color);
|
||||
STATIC XTAPI ULONG GetNextColor();
|
||||
STATIC XTAPI ULONG GetPagingColors();
|
||||
STATIC XTAPI ULONG GetPagingColorsMask();
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* __XTOSKRNL_MM_PFN_HH */
|
||||
Reference in New Issue
Block a user