|
Last change
on this file since 100 was
81,
checked in by rosiere, 18 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
|
File size:
636 bytes
|
| Line | |
|---|
| 1 | #include "../include/Segment.h" |
|---|
| 2 | |
|---|
| 3 | namespace environment { |
|---|
| 4 | namespace data { |
|---|
| 5 | |
|---|
| 6 | Segment::Segment (void) |
|---|
| 7 | { |
|---|
| 8 | name = ""; |
|---|
| 9 | base = 0; |
|---|
| 10 | size = 0; |
|---|
| 11 | uncached = false; |
|---|
| 12 | data = NULL; |
|---|
| 13 | type = TYPE_TARGET_MEMORY; |
|---|
| 14 | index = 0; |
|---|
| 15 | } |
|---|
| 16 | |
|---|
| 17 | Segment::Segment (SEGMENT_TABLE_ENTRY * segment) |
|---|
| 18 | { |
|---|
| 19 | name = segment->getName(); |
|---|
| 20 | |
|---|
| 21 | base = segment->getBase(); |
|---|
| 22 | size = segment->getSize(); |
|---|
| 23 | uncached = segment->getUncached(); |
|---|
| 24 | data = new char [size]; |
|---|
| 25 | type = TYPE_TARGET_MEMORY; |
|---|
| 26 | index = 0; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | Segment::~Segment(void) |
|---|
| 30 | { |
|---|
| 31 | if (size>0) |
|---|
| 32 | delete [] data; |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | }; |
|---|
| 36 | }; |
|---|
Note: See
TracBrowser
for help on using the repository browser.