mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-20 05:55:44 +00:00
No need for this exception as new already throws
This commit is contained in:
parent
4bb5dca1ea
commit
4a5d9ba0b0
@ -1248,10 +1248,6 @@ void hypervisor::allocate_vm_states()
|
|||||||
// As Windows technically supports cpu hot-plugging, keep track of the allocation count
|
// As Windows technically supports cpu hot-plugging, keep track of the allocation count
|
||||||
this->vm_state_count_ = thread::get_processor_count();
|
this->vm_state_count_ = thread::get_processor_count();
|
||||||
this->vm_states_ = new vmx::vm_state*[this->vm_state_count_]{};
|
this->vm_states_ = new vmx::vm_state*[this->vm_state_count_]{};
|
||||||
if (!this->vm_states_)
|
|
||||||
{
|
|
||||||
throw std::runtime_error("Failed to allocate VM states array");
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto i = 0u; i < this->vm_state_count_; ++i)
|
for (auto i = 0u; i < this->vm_state_count_; ++i)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user