How do games like GTA IV not fragment the heap?

后端 未结 6 1242
深忆病人
深忆病人 2021-01-31 05:21

I\'m interested in the type of memory management a game like GTA IV might use given that it needs to create and delete lots of objects very quickly. How do the avoid fragmenting

6条回答
  •  [愿得一人]
    2021-01-31 06:00

    They use things like memory pooling, specialized allocators, and specialized container classes.

    1. The Hoard Memory allocator for multi-threaded programs.
    2. EA's version of the STL. Contains allocators, containers,

提交回复
热议问题