Use nothrow in raw_malloc

This commit is contained in:
apio 2022-12-16 20:36:43 +01:00
parent 345e13965e
commit e56075fb46
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -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);