Метод | Описание | |
---|---|---|
CleanUp ( ) : void | ||
Defragment ( ) : void |
Defragments contiguous free chunks. Automatically called when a chunk of appropriate size cannot be recycled.
|
|
Dispose ( ) : void | ||
GATDataAllocator ( InitializationSettings initSettings ) : System |
Initializes a new instance of the GATDataAllocator class. In most cases, only the default allocator initialized by GATManager is required.
|
|
GetDataContainer ( int size ) : |
Finds and virtually allocates a GATManagedData instance before returning it as a GATData reference. First, the algorithm looks at the free chunks bin of appropriate size. If the bin doesn't hold any chunk, it will check if there is enough unfragmented space. If there isn't, it will look at bins holding larger chunks and fragment one if found. Finally, it will attempt defragmenting and run again, before logging an out of memory error.
|
|
GetDebugInfo ( ) : List |
Gets information regarding each allocated chunk.
|
|
GetFixedDataContainer ( int size, string description ) : |
Allocates a fixed chunk of memory. Fixed chunks cannot be freed, but may be of any size. For debugging ease, a description is required when requesting a fixed chunk.
|
|
GetFixedDebugInfo ( ) : List |
Gets information regarding fixed allocations.
|
|
NbOfAvailableChunksForSize ( int size ) : int |
A conservative estimate of the available number of chunks. Takes into account both unfragmented memory and recyclable previously allocated chunks.
|
Метод | Описание | |
---|---|---|
AddToFreeChunksBins ( GATManagedData chunk ) : void | ||
Dispose ( bool explicitly ) : void | ||
GetBinIndexForSize ( int size ) : int | ||
GetOrMakeChunk ( ) : GATManagedData | ||
InitCursors ( ) : void | ||
TryFragmentBins ( int fromBinIndex, int binSize, GATManagedData &chunk ) : bool |
public GATDataAllocator ( InitializationSettings initSettings ) : System | ||
initSettings | InitializationSettings | |
Результат | System |
public GetDataContainer ( int size ) : |
||
size | int | /// Size of the chunk to virtually allocate. /// |
Результат |
public GetFixedDataContainer ( int size, string description ) : |
||
size | int | |
description | string | |
Результат |
public NbOfAvailableChunksForSize ( int size ) : int | ||
size | int | |
Результат | int |