Use nothrow in raw_malloc
This commit is contained in:
parent
345e13965e
commit
e56075fb46
@ -7,7 +7,7 @@
|
|||||||
[[nodiscard]] void* raw_malloc(usize size)
|
[[nodiscard]] void* raw_malloc(usize size)
|
||||||
{
|
{
|
||||||
#ifdef USE_FREESTANDING
|
#ifdef USE_FREESTANDING
|
||||||
char* const rc = new char[size];
|
char* const rc = new (std::nothrow) char[size];
|
||||||
return (void*)rc;
|
return (void*)rc;
|
||||||
#else
|
#else
|
||||||
return malloc(size);
|
return malloc(size);
|
||||||
|
Loading…
Reference in New Issue
Block a user