Added error message to Windows Pal using VirtualAlloc. (#44)
This commit is contained in:
committed by
GitHub
parent
8d5432c559
commit
3c9fe1041a
@@ -217,7 +217,12 @@ namespace snmalloc
|
||||
if (committed)
|
||||
flags |= MEM_COMMIT;
|
||||
|
||||
return VirtualAlloc(nullptr, *size, flags, PAGE_READWRITE);
|
||||
void* ret = VirtualAlloc(nullptr, *size, flags, PAGE_READWRITE);
|
||||
if (ret == nullptr)
|
||||
{
|
||||
error("Failed to allocate memory\n");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
# endif
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user