Skip to content

Arma-3-v2.0.6-20220419

Compare
Choose a tag to compare
@GoldJohnKing GoldJohnKing released this 19 Apr 11:53
· 4 commits to Arma-3-v2.0.6 since this release

Changelog

  • Update follow upstream, see https://github.com/microsoft/mimalloc/releases/tag/v2.0.6 for details.
  • Fix: Do not flush memory on MemFlushCache called, which follows official malloc's behavior. See here for details.
  • Fix: Never call mi_collect(true) to force flush memory cache, as it has potential to cause crash. Call mi_collect(false) instead.
  • Redesign variants, now we have one for general use, a lock-pages variant and a no-collect variant for users with large memory, and a scheduled-collect variant for users with small memory.

Description

This is a port of Microsoft's mimalloc memory allocator for Arma 3 and Arma 2: Operation Arrowhead, which utilizes (reserved) huge pages, and may give a performance boost of 5-15% than vanilla BI's TBBv4 memory allocator, depending on your PC's specifications and actual scenarios.

Which version should I use?

mimalloc-v206.dll is for general use, if you do not know which one to choose, this is always the recommendation.

If you have large memory and always have more than 8 GB consecutive free memory space when you run Arma 3, you may try mimalloc-v206-lock-pages.dll, as it would lock several consecutive 1 GB large pages in your physical memory and prevent it from being swapped into virtual memory. However, based on various tests and players' feedback, this may only provide minor performance gain, while bring side-effects in some circumstances. I would not recommend to use this variant personally, but it does do better works sometimes.

If you have large memory and do not want to use the "lock-pages" variant, or you frequently encounter the "STATUS_ACCESS_VIOLATION" crash, you may want to try mimalloc-v206-no-collect.dll. This variant would omit all memory flush/free requests from Arma 3, keeping the memory blocks managed by mimalloc internally, which may greatly reduce the probability of the crash. However, this crash is usually caused by hardware issue, you shall always check if your PC is too overclocked or too old.

If you have small memory, I recommend using mimalloc-v206-scheduled-collect.dll. This variant would collect and flush unused memory every 5 minutes, which may keep the memory less fragmented and reduce memory use. However, this is not without risks. As I said above, if you frequently encounter the "STATUS_ACCESS_VIOLATION" crash, you should fallback to general one or "no-collect" variant.

About other memory allocator

You may also check out my port of Intel's tbbmalloc memory allocator at GoldJohnKing/oneTBB.

Although mimalloc gives an overall better result on theoretical benchmark, it's been reported that my modified tbbmalloc may gives even better framerate on some machine, especially Intel Core 12th. It's best to try it out on your own!