Fix rmemory_allocator

Former-commit-id: 0f8c26bc33aab05e357e13f6fa1f974ecb223738
This commit is contained in:
2023-10-12 04:33:28 -07:00
parent 9843b74547
commit 2d4ba7275f
2 changed files with 2 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ struct rmemory_allocator {
if (size == 0) {
out = nullptr;
} else {
out = reinterpret_cast< T* >(new uchar[size]);
out = reinterpret_cast< T* >(NEW uchar[size]);
}
}
// TODO: this fixes a regswap in vector::reserve
@@ -25,7 +25,7 @@ struct rmemory_allocator {
if (size == 0) {
return nullptr;
} else {
return reinterpret_cast< T* >(new uchar[size]);
return reinterpret_cast< T* >(NEW uchar[size]);
}
}
template < typename T >