GTA:SA Streaming Garbage Collection

From Multi Theft Auto: Wiki
Revision as of 17:35, 27 November 2013 by The GTA (talk | contribs) (Created page with "The '''GTA:SA Streaming Garbage Collection system''' monitors the usage of game memory. It maintains the streaming memory limit for the entire game engine. Streaming memory is ca...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The GTA:SA Streaming Garbage Collection system monitors the usage of game memory. It maintains the streaming memory limit for the entire game engine. Streaming memory is calculated by adding up the resource file chunk size of every loaded game resource. When the limit is reached, the system will attempt to free space by destroying resources from game instances. If this process fails, the game engine will hang (by design). This limit can be adjusted by setting the video memory setting in your MTA video settings.

Active Streaming Entities

Objects, buildings and dummies that have their RenderWare resources loaded are added into the active entity garbage collector. Once it runs, it will destroy the RenderWare objects of all registered entities that are out of sight and far away. If the model reference count has reached 0, the system will free the model resource. Natively, the engine can handle 1000 entities in its sorted container (CRenderChainInterface <streamingChainInfo>). If allocation of a container node fails, the requesting entity does destroy its RenderWare data. Hence, natively, only 1000 objects, buildings or dummies can be rendered at a time. The failure to allocate container nodes has often been seen at high draw distances (a.k.a. the blinking building bug).