My Project
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
vspace::internals::VSeg Struct Reference

#include <vspace.h>

Public Member Functions

bool is_free ()
 
Blockblock_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.

1581 : base(NULL) {
1582 }
#define NULL
Definition: omList.c:12
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.

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

Member Function Documentation

◆ block_ptr()

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

Definition at line 1571 of file vspace.h.

1571 {
1572 return (Block *) (base + addr);
1573 }

◆ is_free() [1/2]

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

Definition at line 1568 of file vspace.h.

1568 {
1569 return base == NULL;
1570 }

◆ is_free() [2/2]

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

Definition at line 1574 of file vspace.h.

1574 {
1575 Block *block = block_ptr(addr);
1576 return block->is_free();
1577 }
#define block
Definition: scanner.cc:646
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.

1578 {
1579 return (void *) (base + addr);
1580 }

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: