From 01b9d03fc67343af29bc10aeec6e1381d53cea87 Mon Sep 17 00:00:00 2001 From: ilgeco Date: Wed, 3 Jun 2026 13:49:39 +0200 Subject: [PATCH] Early warning on memory address --- src/PIM/Compiler/PimCodeGen.cpp | 2 ++ 1 file changed, 2 insertions(+) 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)