Early warning on memory address
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user