changeset 12cfde8f819b in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=12cfde8f819b
description:
ruby: fixed data block assignment fix
Fixed data block assignment to not delete if not internally allocated.
diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
src/mem/ruby/common/DataBlock.hh | 4 +++-
diffs (14 lines):
diff -r 3d8241813e4b -r 12cfde8f819b src/mem/ruby/common/DataBlock.hh
--- a/src/mem/ruby/common/DataBlock.hh Wed Feb 10 16:40:54 2010 -0800
+++ b/src/mem/ruby/common/DataBlock.hh Wed Feb 10 16:40:54 2010 -0800
@@ -82,7 +82,9 @@
inline
void DataBlock::assign(uint8* data)
{
- delete [] m_data;
+ if (m_alloc) {
+ delete [] m_data;
+ }
m_data = data;
m_alloc = false;
}
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev