summaryrefslogtreecommitdiffhomepage
path: root/dev/Kernel/SystemKit/SwapDisk.h
blob: c0be0108a37244aa2ef7b21f551851e5818d6089 (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, t& Corporation, all rights reserved.

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

#pragma once

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

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

/// @file SwapDisk.h
/// @brief Virtual memory swap disk.

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