nachos.kernel.userprog
Class NoffHeader.NoffSegment

java.lang.Object
  extended by nachos.kernel.userprog.NoffHeader.NoffSegment
Enclosing class:
NoffHeader

static class NoffHeader.NoffSegment
extends java.lang.Object

A NoffSegment object contains information about one segment of a NOFF executable file.


Field Summary
(package private)  int inFileAddr
          The location of the segment in the NOFF file.
(package private)  int size
          The size of the segment in bytes.
(package private)  int virtualAddr
          The location of segment in user virtual address space.
 
Constructor Summary
private NoffHeader.NoffSegment()
          Private constructor, to force use of readSegment() to initialize a NoffSegment.
 
Method Summary
(package private) static NoffHeader.NoffSegment readSegment(OpenFile f)
          Initialize a NoffSegment with data from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

virtualAddr

int virtualAddr
The location of segment in user virtual address space.


inFileAddr

int inFileAddr
The location of the segment in the NOFF file.


size

int size
The size of the segment in bytes.

Constructor Detail

NoffHeader.NoffSegment

private NoffHeader.NoffSegment()
Private constructor, to force use of readSegment() to initialize a NoffSegment.

Method Detail

readSegment

static NoffHeader.NoffSegment readSegment(OpenFile f)
Initialize a NoffSegment with data from a file.

Parameters:
f - The file from which to read the data.