Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Block_map Class Reference

A block map associates virtual addresses with 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 Member Functions

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

Detailed Description

A block map associates virtual addresses with 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 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  block_number
 

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

Mark the page as present if the block number is non-zero. Zero indicates a non-present page.


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

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