summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/SystemKit/SwapDisk.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-03-26 17:02:24 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-03-26 17:02:24 +0100
commit6c09ce86367ef0729a25e58314eefc543aaa83b7 (patch)
tree6181305a9eac8976ebb06d0897b367269281749a /dev/kernel/SystemKit/SwapDisk.h
parent3852d6115bcd5c9ad80451ffac2892d38f604333 (diff)
feat(kernel): SwapKit+kSwap variant type.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/SystemKit/SwapDisk.h')
-rw-r--r--dev/kernel/SystemKit/SwapDisk.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/dev/kernel/SystemKit/SwapDisk.h b/dev/kernel/SystemKit/SwapDisk.h
deleted file mode 100644
index 11cc6332..00000000
--- a/dev/kernel/SystemKit/SwapDisk.h
+++ /dev/null
@@ -1,46 +0,0 @@
-
-/* -------------------------------------------
-
- Copyright (C) 2024-2025 Amlal EL Mahrouss Labs, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <NewKit/Defines.h>
-#include <CompilerKit/CompilerKit.h>
-
-#define kSwapBlockMaxSize (mib_cast(16))
-#define kSwapPageFile "/boot/pagefile.sys"
-
-/// @file SwapDisk.h
-/// @brief Virtual memory swap disk.
-
-namespace NeOS
-{
- struct SWAP_DISK_HEADER;
-
- /// @brief This class is a disk swap delegate for any data. available as a syscall too.
- class SwapDisk final
- {
- public:
- explicit SwapDisk() = default;
- ~SwapDisk() = default;
-
- NE_COPY_DEFAULT(SwapDisk);
-
- BOOL Write(const Char* fork_name, const SizeT fork_name_len, SWAP_DISK_HEADER* data, const SizeT data_len);
- SWAP_DISK_HEADER* Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len);
- };
-
- typedef struct SWAP_DISK_HEADER
- {
- UInt32 fMagic;
- SizeT fHeaderSz;
- UInt64 fTeamID;
- UInt64 fProcessID;
- UInt64 fVirtualAddress;
- SizeT fBlobSz;
- Char fBlob[];
- } PACKED SWAP_DISK_HEADER;
-} // namespace NeOS