summaryrefslogtreecommitdiff
path: root/src/mem/ruby/common/DataBlock.cc
blob: 5e6b8338e464b47029536ce3a2251d3557c0236f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

#include "mem/ruby/common/DataBlock.hh"

DataBlock &
DataBlock::operator=(const DataBlock & obj)
{
  if (this == &obj) {
    //    assert(false);
  } else {
    if (!m_alloc)
      m_data = new uint8[RubySystem::getBlockSizeBytes()];
    memcpy(m_data, obj.m_data, RubySystem::getBlockSizeBytes());
    m_alloc = true;
  }
  return *this;
}