summaryrefslogtreecommitdiff
path: root/src/base/chunk_generator.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <Steve.Reinhardt@amd.com>2008-11-10 14:11:07 -0800
committerSteve Reinhardt <Steve.Reinhardt@amd.com>2008-11-10 14:11:07 -0800
commit63127cbf37ac9b37096c5ede06c929069a5ceb49 (patch)
tree6864d3fec8b7b043f3533f8dad70ad990a1a7837 /src/base/chunk_generator.hh
parent42bd460d7f91f4d0f76901a8d661d5fe6292b7f2 (diff)
downloadgem5-63127cbf37ac9b37096c5ede06c929069a5ceb49.tar.xz
mem: Assert that requests have non-negative size.
Would have saved me much debugging time if these had been in there previously.
Diffstat (limited to 'src/base/chunk_generator.hh')
-rw-r--r--src/base/chunk_generator.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/base/chunk_generator.hh b/src/base/chunk_generator.hh
index e8238464b..d2ae45d1e 100644
--- a/src/base/chunk_generator.hh
+++ b/src/base/chunk_generator.hh
@@ -82,6 +82,7 @@ class ChunkGenerator
{
// chunkSize must be a power of two
assert(chunkSize == 0 || isPowerOf2(chunkSize));
+ assert(totalSize >= 0);
// set up initial chunk.
curAddr = startAddr;