struct MemoryParams { MemoryHeap::HeapDesc Desc; float HeapLimitMultiplier; unsigned MaxCollectionRoots; unsigned FramesBetweenCollections; unsigned InitialDynamicLimit; unsigned RunsToUpgradeGen; unsigned RunsToCollectYoung; unsigned RunsToCollectOld; };
MemoryParams describes the memory configuration options set for the movie frame. These options are provided to describe memory heaps and garbage collection behavior.
Data Member |
Description |
Heap descriptor for the heap created for the movie. It is possible to specify heap alignment, granularity, limit, flags for the movie heap. If limit specified for the heap is reached, then the heap will garbage collect and try to maintain its size at the specified limit. | |
Number of frames after which collection is forced, even if the max roots cap is not reached. It often beneficial to perform intermediate collections when the max roots cap is high, because it reduces the collection cost when that occurs. | |
A heap limit multiplier (0..1) that is used to determine how much the heap limit grows if memory limit for movie exceeds. The algorithm is as follows: | |
An initial limit of the heap (by default it is equal to INITIAL_DYNAMIC_LIMIT (128K)). This is the limit when OnExceedLimit will be invoked first time, even if Desc.Limit is set to a higher value. Desc.Limit will be used as an 'user limit', meaning the limit when Collect will be enforced. But even if Desc.Limit is not set or not reached yet the OnExceedLimit still may call Collect in the case when size of new allocations exceeds current memory footprint * HeapLimitMutliplier (which is likely for low HeapLimitMutliplier value and/or for complex content at the start). To prevent these Collect calls... more | |
Number of roots before garbage collection is executed. This is an initial value of max roots cap; it might be increased during the execution. | |
Controls 'generations' in GC (AS3 only). RunsToCollectOld is the number of regular calls to GC (excluding ones forced by the user) before GC collects 'old' objects. | |
Controls 'generations' in GC (AS3 only). RunsToCollectYoung is the number of regular calls to GC (excluding ones forced by the user) before GC collects 'young' objects. | |
Controls 'generations' in GC (AS3 only). RunsToUpgradeGen is the number of regular calls to GC (excluding ones forced by the user) before generations are upgraded by one step ('newborn' -> 'young', 'young' -> 'old'). |
Method |
Description |
Initializes the heap and garbage collector parameters with the default value. |
GFx_Player.h