Early warning on memory address

This commit is contained in:
ilgeco
2026-06-03 13:49:39 +02:00
parent 3c2667f11e
commit 01b9d03fc6
+2
View File
@@ -23,6 +23,7 @@
#include <absl/types/compare.h>
#include <algorithm>
#include <cassert>
#include <climits>
#include <cstdint>
#include <fstream>
#include <limits>
@@ -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)