DataBlock.cc revision 6285
16145Snate@binkert.org 26154Snate@binkert.org#include "mem/ruby/common/DataBlock.hh" 36145Snate@binkert.org 46285Snate@binkert.orgDataBlock & 56285Snate@binkert.orgDataBlock::operator=(const DataBlock & obj) 66145Snate@binkert.org{ 76285Snate@binkert.org if (this == &obj) { 86285Snate@binkert.org // assert(false); 96285Snate@binkert.org } else { 106285Snate@binkert.org if (!m_alloc) 116285Snate@binkert.org m_data = new uint8[RubySystem::getBlockSizeBytes()]; 126285Snate@binkert.org memcpy(m_data, obj.m_data, RubySystem::getBlockSizeBytes()); 136285Snate@binkert.org m_alloc = true; 146145Snate@binkert.org } 156285Snate@binkert.org return *this; 166145Snate@binkert.org} 17