Remove superfluous asserts.

Operator new will throw std::bad_alloc
when running out of memory.
This commit is contained in:
Maxim Poliakovski 2020-01-07 12:43:16 +01:00
parent c2bbdc4144
commit 6dbd9f1c99
2 changed files with 0 additions and 5 deletions

View File

@ -50,8 +50,6 @@ bool MemCtrlBase::add_mem_region(uint32_t start_addr, uint32_t size,
return false;
uint8_t *reg_content = new uint8_t[size];
if (!reg_content)
return false;
this->mem_regions.push_back(reg_content);

View File

@ -10,7 +10,6 @@
#include <iostream>
#include <map>
#include <cassert>
#include <cstring>
#include <cinttypes>
#include <array>
@ -435,11 +434,9 @@ int main(int argc, char **argv)
return 1;
}
machine_id = new GossamerID(0x3d8c);
assert(machine_id != 0);
mpc106->add_mmio_region(0xFF000004, 4096, machine_id);
heathrow = new HeathrowIC();
assert(heathrow != 0);
mpc106->pci_register_device(16, heathrow);
cout << "done" << endl;
}