summaryrefslogtreecommitdiff
path: root/src/mem/physical.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-06-04 23:21:12 -0700
committerNathan Binkert <nate@binkert.org>2009-06-04 23:21:12 -0700
commit6faf377b5305f9dcc3c7b013c4d67f5accb92617 (patch)
tree0e437fb49a32dd3d2d2bec95a8dc3bdb4ddf05b0 /src/mem/physical.cc
parent4e3426624557b555c354035ee3961eab7554d81d (diff)
downloadgem5-6faf377b5305f9dcc3c7b013c4d67f5accb92617.tar.xz
types: clean up types, especially signed vs unsigned
Diffstat (limited to 'src/mem/physical.cc')
-rw-r--r--src/mem/physical.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index a49c12a5c..e6150c548 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -106,8 +106,8 @@ PhysicalMemory::new_page()
return return_addr;
}
-int
-PhysicalMemory::deviceBlockSize()
+unsigned
+PhysicalMemory::deviceBlockSize() const
{
//Can accept anysize request
return 0;
@@ -360,8 +360,8 @@ PhysicalMemory::getPort(const std::string &if_name, int idx)
panic("PhysicalMemory::getPort: unknown port %s requested", if_name);
}
- if (idx >= ports.size()) {
- ports.resize(idx+1);
+ if (idx >= (int)ports.size()) {
+ ports.resize(idx + 1);
}
if (ports[idx] != NULL) {
@@ -407,8 +407,8 @@ PhysicalMemory::getAddressRanges(AddrRangeList &resp, bool &snoop)
resp.push_back(RangeSize(start(), params()->range.size()));
}
-int
-PhysicalMemory::MemoryPort::deviceBlockSize()
+unsigned
+PhysicalMemory::MemoryPort::deviceBlockSize() const
{
return memory->deviceBlockSize();
}
@@ -474,7 +474,7 @@ PhysicalMemory::serialize(ostream &os)
filename);
if (gzwrite(compressedMem, pmemAddr, params()->range.size()) !=
- params()->range.size()) {
+ (int)params()->range.size()) {
fatal("Write failed on physical memory checkpoint file '%s'\n",
filename);
}
@@ -495,7 +495,7 @@ PhysicalMemory::unserialize(Checkpoint *cp, const string &section)
long *pmem_current;
uint64_t curSize;
uint32_t bytesRead;
- const int chunkSize = 16384;
+ const uint32_t chunkSize = 16384;
string filename;
@@ -545,7 +545,7 @@ PhysicalMemory::unserialize(Checkpoint *cp, const string &section)
assert(bytesRead % sizeof(long) == 0);
- for (int x = 0; x < bytesRead/sizeof(long); x++)
+ for (uint32_t x = 0; x < bytesRead / sizeof(long); x++)
{
if (*(tempPage+x) != 0) {
pmem_current = (long*)(pmemAddr + curSize + x * sizeof(long));