Fix aligned alloc for Win32 targets.

This commit is contained in:
Christoffer Lerno
2024-08-19 15:25:00 +02:00
parent 476a6424ee
commit 79a1639f8a
3 changed files with 4 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ fn void*! LibcAllocator.acquire(&self, usz bytes, AllocInitType init_type, usz a
{
if (alignment > 0)
{
return win32::_aligned_recalloc(null, bytes, alignment) ?: AllocationFailure.OUT_OF_MEMORY?;
return win32::_aligned_recalloc(null, 1, bytes, alignment) ?: AllocationFailure.OUT_OF_MEMORY?;
}
return libc::calloc(1, bytes) ?: AllocationFailure.OUT_OF_MEMORY?;
}