#include <segment.h>
Collaboration diagram for Segment:

Public Member Functions | |
| void | init (unsigned first_block, unsigned index) |
| void | alloc_buffers (Size segment_size_without_header) |
| void | free_buffers () |
| void | print () |
Public Attributes | |
| Segment_header * | header |
| void * | buffer |
| unsigned | first_block |
| unsigned | curr_page_block |
| Size | pages_count |
| unsigned | index |
The disk is divided up into a series of fixed-size segments, and each segment contains several data pages. A Segment object in memory provides information about a single storage segment on disk. It contains a copy of the segment's header and a buffer containing its page data.
|
|
Allocate the header and data buffers in memory for this segment.
|
|
|
Free any buffers used by this segment.
|
|
||||||||||||
|
Initialize this segment in memory.
|
|
|
Print basic information about this segment.
|
|
|
contains the segment's page data
|
|
|
disk block of current page
|
|
|
block number of segment on disk
|
|
|
copy of segment's metadata
|
|
|
0th segment is 0, 1st segment is 1
|
|
|
number of pages stored in segment
|
Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman