diff --git a/src/PIM/Compiler/PimCodeGen.cpp b/src/PIM/Compiler/PimCodeGen.cpp index dba3664..57043ad 100644 --- a/src/PIM/Compiler/PimCodeGen.cpp +++ b/src/PIM/Compiler/PimCodeGen.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,7 @@ void PimMemory::allocateGatheredMemory() { void PimMemory::allocateMemoryForValue(const MemoryValueKey& key, MemEntry& memEntry) { memEntry.address = firstAvailableAddress; + assert(memEntry.address < (size_t) INT_MAX && "Address allocated bigger than 32bit"); firstAvailableAddress += memEntry.size; // Alignment if (size_t remainder = firstAvailableAddress % minAlignment)