changeset 7909b6cf7188 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=7909b6cf7188
description:
        Mem: Make members relating to range and size constant

        This patch makes the address-range related members const. The change
        is trivial and merely ensures that they can be called on a const
        memory.

diffstat:

 src/mem/abstract_mem.cc |  2 +-
 src/mem/abstract_mem.hh |  6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 4e1ceddba87b -r 7909b6cf7188 src/mem/abstract_mem.cc
--- a/src/mem/abstract_mem.cc   Mon Jul 09 12:35:42 2012 -0400
+++ b/src/mem/abstract_mem.cc   Mon Jul 09 12:35:44 2012 -0400
@@ -222,7 +222,7 @@
 }
 
 Range<Addr>
-AbstractMemory::getAddrRange()
+AbstractMemory::getAddrRange() const
 {
     return range;
 }
diff -r 4e1ceddba87b -r 7909b6cf7188 src/mem/abstract_mem.hh
--- a/src/mem/abstract_mem.hh   Mon Jul 09 12:35:42 2012 -0400
+++ b/src/mem/abstract_mem.hh   Mon Jul 09 12:35:44 2012 -0400
@@ -209,21 +209,21 @@
      *
      * @return a single contigous address range
      */
-    Range<Addr> getAddrRange();
+    Range<Addr> getAddrRange() const;
 
     /**
      * Get the memory size.
      *
      * @return the size of the memory
      */
-    uint64_t size() { return range.size(); }
+    uint64_t size() const { return range.size(); }
 
     /**
      * Get the start address.
      *
      * @return the start address of the memory
      */
-    Addr start() { return range.start; }
+    Addr start() const { return range.start; }
 
     /**
      *  Should this memory be passed to the kernel and part of the OS
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to