mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 14:24:54 +00:00
Merge pull request #13521 from OatmealDome/darwin-memarena-ub
MemArenaDarwin: Initialize all address variables passed to vm_map
This commit is contained in:
commit
5af315ec17
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ void* MemArena::CreateView(s64 offset, size_t size)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
vm_address_t address;
|
||||
vm_address_t address = 0;
|
||||
constexpr vm_prot_t prot = VM_PROT_READ | VM_PROT_WRITE;
|
||||
|
||||
kern_return_t retval = vm_map(mach_task_self(), &address, size, 0, VM_FLAGS_ANYWHERE, m_shm_entry,
|
||||
|
@ -88,7 +88,7 @@ void MemArena::ReleaseView(void* view, size_t size)
|
|||
|
||||
u8* MemArena::ReserveMemoryRegion(size_t memory_size)
|
||||
{
|
||||
vm_address_t address;
|
||||
vm_address_t address = 0;
|
||||
|
||||
kern_return_t retval = vm_allocate(mach_task_self(), &address, memory_size, VM_FLAGS_ANYWHERE);
|
||||
if (retval != KERN_SUCCESS)
|
||||
|
|
Loading…
Add table
Reference in a new issue