NeKernel dev
Loading...
Searching...
No Matches
Kernel::DiskSwapInterface Class Referencefinal

Virtual memory interface to swap memory chunks onto disk. More...

#include <DiskSwap.h>

Public Member Functions

 DiskSwapInterface ()=default
 ~DiskSwapInterface ()=default
BOOL Write (const Char *name, SizeT name_len, SWAP_DISK_HEADER *data)
 Write memory chunk onto disk.
_Output SWAP_DISK_HEADERRead (const Char *name, SizeT name_len, SizeT data_len)
 Read memory chunk from disk.

Detailed Description

Virtual memory interface to swap memory chunks onto disk.

Note
The class only supports the NeFS as of right now, as it is using forks to write data into disk.

Constructor & Destructor Documentation

◆ DiskSwapInterface()

Kernel::DiskSwapInterface::DiskSwapInterface ( )
explicitdefault

◆ ~DiskSwapInterface()

Kernel::DiskSwapInterface::~DiskSwapInterface ( )
default

Member Function Documentation

◆ Read()

SWAP_DISK_HEADER * Kernel::DiskSwapInterface::Read ( const Char * fork_name,
SizeT fork_name_len,
SizeT data_len )

Read memory chunk from disk.

Parameters
nameThe swap name to recognize this memory region.
name_lenlength of fork name.
datathe data packet length.
Returns
Whether the swap was fetched to disk, or not.
Parameters
fork_nameThe swap name to recognize this memory region.
fork_name_lenlength of fork name.
datathe data packet length.
Returns
Whether the swap was fetched to disk, or not.

◆ Write()

BOOL Kernel::DiskSwapInterface::Write ( const Char * fork_name,
SizeT fork_name_len,
SWAP_DISK_HEADER * data )

Write memory chunk onto disk.

Parameters
nameThe swap name to recognize this memory region.
name_lenlength of fork name.
datathe data packet.
Returns
Whether the swap was written to disk, or not.
Parameters
fork_nameThe swap name to recognize this memory region.
fork_name_lenlength of fork name.
datathe data packet.
Returns
Whether the swap was written to disk, or not.

The documentation for this class was generated from the following files: