DataBlock.cc revision 6285
1
2#include "mem/ruby/common/DataBlock.hh"
3
4DataBlock &
5DataBlock::operator=(const DataBlock & obj)
6{
7  if (this == &obj) {
8    //    assert(false);
9  } else {
10    if (!m_alloc)
11      m_data = new uint8[RubySystem::getBlockSizeBytes()];
12    memcpy(m_data, obj.m_data, RubySystem::getBlockSizeBytes());
13    m_alloc = true;
14  }
15  return *this;
16}
17