changeset 88d422d737db in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=88d422d737db
description:
Ruby Memory Vector: Allow more than 4GB of memory
The memory size variable was a 32-bit int. This meant that the size of
the
memory was limited to 4GB. This patch changes the type of the variable
to
64-bit to support larger memory sizes. Thanks to Raghuraman
Balasubramanian
for bringing this to notice.
diffstat:
src/mem/ruby/system/MemoryVector.hh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 89acf0b76858 -r 88d422d737db src/mem/ruby/system/MemoryVector.hh
--- a/src/mem/ruby/system/MemoryVector.hh Sat Aug 25 15:49:07 2012 -0500
+++ b/src/mem/ruby/system/MemoryVector.hh Mon Aug 27 01:00:54 2012 -0500
@@ -42,11 +42,11 @@
{
public:
MemoryVector();
- MemoryVector(uint32 size);
+ MemoryVector(uint64 size);
~MemoryVector();
friend class DirectoryMemory;
- void resize(uint32 size); // destructive
+ void resize(uint64 size); // destructive
void write(const Address & paddr, uint8* data, int len);
uint8* read(const Address & paddr, uint8* data, int len);
@@ -56,7 +56,7 @@
private:
uint8* getBlockPtr(const PhysAddress & addr);
- uint32 m_size;
+ uint64 m_size;
uint8** m_pages;
uint32 m_num_pages;
const uint32 m_page_offset_mask;
@@ -73,7 +73,7 @@
}
inline
-MemoryVector::MemoryVector(uint32 size)
+MemoryVector::MemoryVector(uint64 size)
: m_page_offset_mask(4095)
{
resize(size);
@@ -91,7 +91,7 @@
}
inline void
-MemoryVector::resize(uint32 size)
+MemoryVector::resize(uint64 size)
{
if (m_pages != NULL){
for (int i = 0; i < m_num_pages; i++) {
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev