diff --git a/src/mem/abstract_mem.cc b/src/mem/abstract_mem.cc index 927fd02459..b5412badf4 100644 --- a/src/mem/abstract_mem.cc +++ b/src/mem/abstract_mem.cc @@ -61,15 +61,9 @@ AbstractMemory::AbstractMemory(const Params *p) : kvmMap(p->kvm_map), _system(NULL), stats(*this) { -} - -void -AbstractMemory::init() -{ - assert(system()); - - if (size() % _system->getPageBytes() != 0) - panic("Memory Size not divisible by page size\n"); + panic_if(!range.valid() || !range.size(), + "Memory range %s must be valid with non-zero size.", + range.to_string()); } void diff --git a/src/mem/abstract_mem.hh b/src/mem/abstract_mem.hh index c8aef702d4..b1d54fdebe 100644 --- a/src/mem/abstract_mem.hh +++ b/src/mem/abstract_mem.hh @@ -209,11 +209,6 @@ class AbstractMemory : public ClockedObject AbstractMemory(const Params* p); virtual ~AbstractMemory() {} - /** - * Initialise this memory. - */ - void init() override; - /** * See if this is a null memory that should never store data and * always return zero.