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.
This commit is contained in:
Andreas Hansson 2012-07-09 12:35:44 -04:00
parent 67e257f442
commit d2f458e7b5
2 changed files with 4 additions and 4 deletions

View file

@ -222,7 +222,7 @@ AbstractMemory::regStats()
} }
Range<Addr> Range<Addr>
AbstractMemory::getAddrRange() AbstractMemory::getAddrRange() const
{ {
return range; return range;
} }

View file

@ -209,21 +209,21 @@ class AbstractMemory : public MemObject
* *
* @return a single contigous address range * @return a single contigous address range
*/ */
Range<Addr> getAddrRange(); Range<Addr> getAddrRange() const;
/** /**
* Get the memory size. * Get the memory size.
* *
* @return the size of the memory * @return the size of the memory
*/ */
uint64_t size() { return range.size(); } uint64_t size() const { return range.size(); }
/** /**
* Get the start address. * Get the start address.
* *
* @return the start address of the memory * @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 * Should this memory be passed to the kernel and part of the OS