Loading...
Searching...
No Matches
vspace::internals::VSeg Struct Reference

`#include <vspace.h>`

## Public Member Functions

bool | is_free ()
Block * | block_ptr (segaddr_t addr)
bool | is_free (segaddr_t addr)
void * | ptr (segaddr_t addr)
| VSeg ()
| VSeg (void *base)

## Data Fields

unsigned char * | base

## Detailed Description

Definition at line 1566 of file vspace.h.

## Constructor & Destructor Documentation

## VSeg() [1/2]

vspace::internals::VSeg::VSeg | ( |  | ) |

inline

Definition at line 1581 of file vspace.h.

: base(NULL) {
}
NULL
#define NULL
Definition omList.c:12
vspace::internals::VSeg::base
unsigned char * base
Definition vspace.h:1567

## VSeg() [2/2]

vspace::internals::VSeg::VSeg | ( | void * | base | ) |

inline

Definition at line 1583 of file vspace.h.

: base((unsigned char *) base) {
}

## Member Function Documentation

## block_ptr()

Block * vspace::internals::VSeg::block_ptr | ( | segaddr_t | addr | ) |

inline

Definition at line 1571 of file vspace.h.

{
return (Block *) (base + addr);
}

## is_free() [1/2]

bool vspace::internals::VSeg::is_free | ( |  | ) |

inline

Definition at line 1568 of file vspace.h.

{
return base == NULL;
}

## is_free() [2/2]

bool vspace::internals::VSeg::is_free | ( | segaddr_t | addr | ) |

inline

Definition at line 1574 of file vspace.h.

{
Block *block = block_ptr(addr);
return block->is_free();
}
block
#define block
Definition scanner.cc:646
vspace::internals::VSeg::block_ptr
Block * block_ptr(segaddr_t addr)
Definition vspace.h:1571

## ptr()

void * vspace::internals::VSeg::ptr | ( | segaddr_t | addr | ) |

inline

Definition at line 1578 of file vspace.h.

{
return (void *) (base + addr);
}

## Field Documentation

## base

unsigned char* vspace::internals::VSeg::base

Definition at line 1567 of file vspace.h.

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

- kernel/oswrapper/vspace.h