summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/SystemKit/Swap.h
blob: 4ba59bcbb6e22f982cba273ad35345fb595ee7da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

/* -------------------------------------------

	Copyright (C) 2024, Theater Quality Corp, all rights reserved.

------------------------------------------- */

#pragma once

#include <NewKit/Defines.h>
#include <CompilerKit/CompilerKit.h>

#define kSwapMgrBlockMaxSize (mib_cast(16))
#define kSwapMgrPageFile	 "/System/pagefile.sys"

/// @file Swap.h
/// @brief Virtual memory swap API.

namespace Kernel
{
	/// @brief This class is a disk swap delegate for any data. available as a syscall too.
	class SwapDiskDelegate final
	{
	public:
		explicit SwapDiskDelegate() = default;
		~SwapDiskDelegate()			= default;

		ZKA_COPY_DEFAULT(SwapDiskDelegate);

		BOOL	Write(const Char* fork_name, const SizeT fork_name_len, VoidPtr data, const SizeT data_len);
		VoidPtr Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len);
	};
} // namespace Kernel