# HG changeset patch
# User Brad Beckmann <brad.beckm...@amd.com>
# Date 1260657437 28800
# Node ID 2d19b51213922c91d5ca388835c8753750b73cbc
# Parent  3c00a365603e5724aea9b87b4b730839ef78139a
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.

diff -r 3c00a365603e -r 2d19b5121392 src/mem/ruby/common/Set.cc
--- a/src/mem/ruby/common/Set.cc        Sat Dec 12 14:37:17 2009 -0800
+++ b/src/mem/ruby/common/Set.cc        Sat Dec 12 14:37:17 2009 -0800
@@ -69,8 +69,11 @@
 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() {

_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to