source: trunk/IPs/systemC/Environment/Data/src/Segment.cpp @ 139

Last change on this file since 139 was 134, checked in by rosiere, 15 years ago

1) valgrind fix
2) debug file on/off

  • Property svn:keywords set to Id
File size: 713 bytes
Line 
1#include "../include/Segment.h"
2
3namespace environment {
4namespace 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    memset((void*)data,0,size * sizeof(char));
28  }
29
30  Segment::~Segment(void)
31  {
32    if (size>0)
33      delete [] data;
34  }
35
36};
37};
Note: See TracBrowser for help on using the repository browser.