mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-02-27 01:29:21 +00:00
Remove superfluous asserts.
Operator new will throw std::bad_alloc when running out of memory.
This commit is contained in:
parent
c2bbdc4144
commit
6dbd9f1c99
@ -50,8 +50,6 @@ bool MemCtrlBase::add_mem_region(uint32_t start_addr, uint32_t size,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint8_t *reg_content = new uint8_t[size];
|
uint8_t *reg_content = new uint8_t[size];
|
||||||
if (!reg_content)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
this->mem_regions.push_back(reg_content);
|
this->mem_regions.push_back(reg_content);
|
||||||
|
|
||||||
|
3
main.cpp
3
main.cpp
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <cassert>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <array>
|
#include <array>
|
||||||
@ -435,11 +434,9 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
machine_id = new GossamerID(0x3d8c);
|
machine_id = new GossamerID(0x3d8c);
|
||||||
assert(machine_id != 0);
|
|
||||||
mpc106->add_mmio_region(0xFF000004, 4096, machine_id);
|
mpc106->add_mmio_region(0xFF000004, 4096, machine_id);
|
||||||
|
|
||||||
heathrow = new HeathrowIC();
|
heathrow = new HeathrowIC();
|
||||||
assert(heathrow != 0);
|
|
||||||
mpc106->pci_register_device(16, heathrow);
|
mpc106->pci_register_device(16, heathrow);
|
||||||
cout << "done" << endl;
|
cout << "done" << endl;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user