How do games like GTA IV not fragment the heap?

后端 未结 6 1294
深忆病人
深忆病人 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:09

    I think because their objects are mostly of the same size they can use some internal memory manager which doesn't actually free memory, but marks it as available and next time chunk of ~size is allocated it returns it.

提交回复
热议问题