diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/base/chunk_generator.hh | 1 | ||||
-rw-r--r-- | src/mem/request.hh | 2 |
2 files changed, 3 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; diff --git a/src/mem/request.hh b/src/mem/request.hh index da0d9c7e0..d1e011c7d 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -172,6 +172,7 @@ class Request : public FastAlloc * allocated Request object. */ void setPhys(Addr _paddr, int _size, int _flags) { + assert(_size >= 0); paddr = _paddr; size = _size; flags = _flags; @@ -188,6 +189,7 @@ class Request : public FastAlloc * allocated Request object. */ void setVirt(int _asid, Addr _vaddr, int _size, int _flags, Addr _pc) { + assert(_size >= 0); asid = _asid; vaddr = _vaddr; size = _size; |