From 020716cab3dca04d3f6b24b6dce67d5f5cbc4e5e Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Fri, 29 Jan 2010 20:29:21 -0800 Subject: 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. --- src/mem/ruby/common/Set.cc | 7 +++++-- 1 file 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() { -- cgit v1.2.3