projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce2d131
)
ruby: fixed Set.cc bug to allow zero sized sets
author
Brad Beckmann
<Brad.Beckmann@amd.com>
Sat, 30 Jan 2010 04:29:21 +0000
(20:29 -0800)
committer
Brad Beckmann
<Brad.Beckmann@amd.com>
Sat, 30 Jan 2010 04:29:21 +0000
(20:29 -0800)
This is necessary for example when no dma sequencers are necessary in the
simulated system.
src/mem/ruby/common/Set.cc
patch
|
blob
|
history
diff --git
a/src/mem/ruby/common/Set.cc
b/src/mem/ruby/common/Set.cc
index f7dd243563e213992f4107e4a1f4e64e4b3369b4..467a09186d70a1a6dbbb19dc2de6296b336961ee 100644
(file)
--- a/
src/mem/ruby/common/Set.cc
+++ b/
src/mem/ruby/common/Set.cc
@@
-69,8
+69,11
@@
Set::Set(const Set& obj) {
Set::Set(int size)
{
m_p_nArray = NULL;
- assert(size>0);
- setSize(size);
+ m_nArrayLen = 0;
+ m_nSize = 0;
+ if(size > 0) {
+ setSize(size);
+ }
}
Set::~Set() {