PatchworkOS  19e446b
A non-POSIX operating system.
Loading...
Searching...
No Matches
space_t Struct Reference

Virtual address space structure. More...

#include <space.h>

Collaboration diagram for space_t:

Public Member Functions

 BITMAP_DEFINE (callbackBitmap, PML_MAX_CALLBACK)
 Bitmap to track available callback IDs.
 
 BITMAP_DEFINE (cpus, CPU_MAX)
 Bitmap to track which CPUs are using this space.
 

Data Fields

page_table_t pageTable
 The page table associated with the address space.
 
map_t pinnedPages
 Map of pages with a pin depth greater than 1.
 
uintptr_t startAddress
 The start address for allocations in this address space.
 
uintptr_t endAddress
 The end address for allocations in this address space.
 
uintptr_t freeAddress
 The next available free virtual address in this address space.
 
space_flags_t flags
 
space_callback_tcallbacks
 
uint64_t callbacksLength
 Length of the callbacks array.
 
atomic_uint16_t shootdownAcks
 
lock_t lock
 

Detailed Description

Virtual address space structure.

The space_t structure represents a virtual address space.

Note that the actual pin depth, if its is greater than 1, is tracked in the pinnedPages map, the page table only tracks if a page is pinned or not for faster access and to avoid having to access the map even when just pinning a page once.

Definition at line 77 of file space.h.

Member Function Documentation

◆ BITMAP_DEFINE() [1/2]

space_t::BITMAP_DEFINE ( callbackBitmap  ,
PML_MAX_CALLBACK   
)

Bitmap to track available callback IDs.

◆ BITMAP_DEFINE() [2/2]

space_t::BITMAP_DEFINE ( cpus  ,
CPU_MAX   
)

Bitmap to track which CPUs are using this space.

Field Documentation

◆ pageTable

page_table_t space_t::pageTable

The page table associated with the address space.

Definition at line 79 of file space.h.

◆ pinnedPages

map_t space_t::pinnedPages

Map of pages with a pin depth greater than 1.

Definition at line 80 of file space.h.

◆ startAddress

uintptr_t space_t::startAddress

The start address for allocations in this address space.

Definition at line 81 of file space.h.

◆ endAddress

uintptr_t space_t::endAddress

The end address for allocations in this address space.

Definition at line 82 of file space.h.

◆ freeAddress

uintptr_t space_t::freeAddress

The next available free virtual address in this address space.

Definition at line 83 of file space.h.

◆ flags

space_flags_t space_t::flags

Definition at line 84 of file space.h.

◆ callbacks

space_callback_t* space_t::callbacks

Array of callbacks for this address space, indexed by the callback ID.

Lazily initialized to a size equal to the largest used callback ID.

Definition at line 90 of file space.h.

◆ callbacksLength

uint64_t space_t::callbacksLength

Length of the callbacks array.

Definition at line 91 of file space.h.

◆ shootdownAcks

atomic_uint16_t space_t::shootdownAcks

Definition at line 94 of file space.h.

◆ lock

lock_t space_t::lock

Definition at line 95 of file space.h.


The documentation for this struct was generated from the following file: