From 6d4866383feac65beaf8ac5fa18557569e25481d Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 16 Oct 2014 05:50:01 -0400 Subject: mem: Modernise PhysicalMemory with C++11 features Bring the PhysicalMemory up-to-date by making use of range-based for loops and vector intialisation where possible. --- src/mem/physical.hh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mem/physical.hh') diff --git a/src/mem/physical.hh b/src/mem/physical.hh index 02fefb478..51ec1cbd3 100644 --- a/src/mem/physical.hh +++ b/src/mem/physical.hh @@ -37,11 +37,11 @@ * Authors: Andreas Hansson */ -#ifndef __PHYSICAL_MEMORY_HH__ -#define __PHYSICAL_MEMORY_HH__ +#ifndef __MEM_PHYSICAL_HH__ +#define __MEM_PHYSICAL_HH__ #include "base/addr_range_map.hh" -#include "mem/port.hh" +#include "mem/packet.hh" /** * Forward declaration to avoid header dependencies. @@ -57,7 +57,7 @@ class AbstractMemory; * system backingstore used by the memories in the simulated guest * system. When the system is created, the physical memory allocates * the backing store based on the address ranges that are populated in - * the system, and does so indepentent of how those map to actual + * the system, and does so independent of how those map to actual * memory controllers. Thus, the physical memory completely abstracts * the mapping of the backing store of the host system and the address * mapping in the guest system. This enables us to arbitrarily change @@ -86,7 +86,7 @@ class PhysicalMemory : public Serializable // The physical memory used to provide the memory in the simulated // system - std::vector > backingStore; + std::vector> backingStore; // Prevent copying PhysicalMemory(const PhysicalMemory&); @@ -162,7 +162,7 @@ class PhysicalMemory : public Serializable * * @return Pointers to the memory backing store */ - std::vector > getBackingStore() const + std::vector> getBackingStore() const { return backingStore; } /** @@ -218,4 +218,4 @@ class PhysicalMemory : public Serializable }; -#endif //__PHYSICAL_MEMORY_HH__ +#endif //__MEM_PHYSICAL_HH__ -- cgit v1.2.3