Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Block_map Class Reference

A block map maps virtual addresses to their corresponding block locations on disk. More...

#include <blockmap.h>

Inherits Address_map.

Inheritance diagram for Block_map:

Inheritance graph
[legend]
Collaboration diagram for Block_map:

Collaboration graph
[legend]
List of all members.

Public Methods

void set_block_number (void *virtual_page, unsigned int block_number)
unsigned int get_block_number (void *virtual_page)

Detailed Description

A block map maps virtual addresses to their corresponding block locations on disk.

The block directory entry of a non-present (on-disk) block table is the block number of the table on disk and various flags. When the block directory is written to disk, it is written so as to contain only table block numbers (whether the correponding tables are present or not), primarily so that they can be read in on the next boot.


Member Function Documentation

unsigned int Block_map::get_block_number void *    virtual_page
 

Return the block number on disk for the given virtual page.

void Block_map::set_block_number void *    virtual_page,
unsigned int    block_number
 

Create a mapping for the given virtual page to its corresponding block number on disk. Mark the page as present.


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

Torsion Operating System, Copyright (C) 2000-2002 Dan Helfman