summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:21 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:21 -0800
commit020716cab3dca04d3f6b24b6dce67d5f5cbc4e5e (patch)
treeeedfba68d71def2973c960f21c39369d65350a38 /src/mem
parentce2d13195ba14766e7ac7f093b369865b6c92cac (diff)
downloadgem5-020716cab3dca04d3f6b24b6dce67d5f5cbc4e5e.tar.xz
ruby: fixed Set.cc bug to allow zero sized sets
This is necessary for example when no dma sequencers are necessary in the simulated system.
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/ruby/common/Set.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mem/ruby/common/Set.cc b/src/mem/ruby/common/Set.cc
index f7dd24356..467a09186 100644
--- 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() {