microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
10.45k stars 843 forks source link

Fix bug where allocating a new arena would not zero memory correctly #816

Closed vblanco20-1 closed 7 months ago

vblanco20-1 commented 1 year ago

When porting mimalloc to playstation, it was found that the function mi_arena_meta_zalloc does not zero allocate the memory when it falls back to _mi_os_alloc. This caused issues on a running application. This pr fixes it by checking if the os memory was already zeroed, and if it wasnt it zeros the allocation.

epoupon commented 1 year ago

Looks related to #703

daanx commented 7 months ago

Thanks for the PR! This was fixed in commit cfacbacabae759718fbbc28dbab88137048b7f49 (and apologies for the late response!)