projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
714865e
)
ruby: fixed data block assignment fix
author
Brad Beckmann
<Brad.Beckmann@amd.com>
Thu, 11 Feb 2010 00:40:54 +0000
(16:40 -0800)
committer
Brad Beckmann
<Brad.Beckmann@amd.com>
Thu, 11 Feb 2010 00:40:54 +0000
(16:40 -0800)
Fixed data block assignment to not delete if not internally allocated.
src/mem/ruby/common/DataBlock.hh
patch
|
blob
|
history
diff --git
a/src/mem/ruby/common/DataBlock.hh
b/src/mem/ruby/common/DataBlock.hh
index 1d399753ed56ce318264ea0b9e4f74c6df061bcd..d62efc72bb4df3b05774053c9313f43bea3ddc08 100644
(file)
--- a/
src/mem/ruby/common/DataBlock.hh
+++ b/
src/mem/ruby/common/DataBlock.hh
@@
-82,7
+82,9
@@
bool operator==(const DataBlock& obj1, const DataBlock& obj2);
inline
void DataBlock::assign(uint8* data)
{
- delete [] m_data;
+ if (m_alloc) {
+ delete [] m_data;
+ }
m_data = data;
m_alloc = false;
}