Do you even know what you're talking about? Cache is a type of volatile memory like RAM. CPU does work from the cache. If it's not in the cache, then it looks for it in primary storage (RAM). If it's not in the primary storage, then it looks for it in secondary storage (hard disk). When it find the data it removes data that is already in the cache (depends on the algorithm, could be FIFO or Least-used or most used, etc.) and put the new memory in it. There's no such thing as a "full cache that needs to be emptied". If the data is needed and not there, then it page faults. If it is, then it gets it. You have no idea what you're even talking about. Not only has this already been acknowledged by the development team as a bug, this has an explanation.
In the following, Memory refers to Dynamic, volatile memory, or primary storage:
When you don't deallocate memory that you are referencing and delete the pointers that access the memory, then the page that was used for the data can no longer be used. So if you had allocated 20 MB of pages for loading an area and then delete the pointers the area when moving to a new area, replacing just the memory that had the pointers (data that just contained the address space, or even just pointers to pointers, which are multidimensional arrays, commonly used in graphics), but don't deallocate the memory that was pointer was referencing, then the pointed addresses can no longer be used. Since the game engine was not built with Java (it was with DX9), then there is no automatic garbage collection. The space is forever not available for use, even if you had new pointer to the area (which just get another 20 MB of pages). When this is done over and over, it is called a memory leak, and the as the system loads more (runs longer) of this code, it will eventually have no more memory to allocate to something else.
I'm sure you just noticed that my entire explanation has nothing to do with cache. That's because this has nothing to do with cache. Cache is faster to access than RAM so the CPU does all of it's work from the cache. Computers don't use just cache because a single cell (bit) of cache use 6 times as many transistors and and 12 times as many capacitors (is 8-12 times larger) than a single cell of RAM. The only difference that would occur between different cache sizes is the amount of page faults (slow down) that occur and nothing else. You make yourself look like an idiot by showing everyone that you don't know what you're talking about, and try to convince them that their wrong.


Reply With Quote

