MemoryManager Class Reference
#include
<mw/MemoryManager.h>
Detailed Description
A class handles all memory operations and OOM issues
- Since
- 3.1
Member Function Documentation
AddCollector ( MMemoryCollector * )
register a memory collector, memory manager doesn't own this collector
- Since
- 3.1
Parameter | Description | aCollector | the collector to be registered |
AddStopper ( MOOMStopper * )
register a stopper, memory manager doesn't own this stopper.
- Since
- 3.1
Parameter | Description | aStopper | the stopper to be registered |
CloseFastAllocator ( RAllocator * )
IMPORT_C void | CloseFastAllocator | ( | RAllocator * | aDefaultAllocator | ) | [static] |
switch to the default allocator provided by Symbian OS, and close the current fast allocator.
- Since
- 3.1
CreateFastAllocator ( )
IMPORT_C void | CreateFastAllocator | ( | ) | [static] |
Create fast allocator and switch as default heap. Special case if fast allocator has to be created from SetupThreadHeap().
DumpMemoryLogs ( )
IMPORT_C void | DumpMemoryLogs | ( | ) | [static] |
Dumps the memory logs i.e. heap allocated, heap free, system free, heap size etc to log file c:.log
- Since
- 9.2
FreeRam ( )
IMPORT_C void | FreeRam | ( | ) | [static] |
Free some RAM. Calls collect on registered collectors
- Since
- 3.1
InitFastAllocator ( )
IMPORT_C void | InitFastAllocator | ( | ) | [static] |
Initialize MemoryManager library. Special case if CreateFastAllocator is called from SetupThreadHeap().
InitOOMDialog ( )
IMPORT_C void | InitOOMDialog | ( | ) | [static] |
initialize the OOM handler in the memorypool
- Since
- 9.2
MemorySize ( TAny * )
retrieve the size of an allocated memory cell
- Since
- 3.1
PostCheck ( )
IMPORT_C TUint | PostCheck | ( | ) | [static] |
An additional check after an operation is completed.
- Since
- 3.1
Returns: the status of memory during this operation.
PreCheck ( TUint, TUint, const TDesC8 & )
check if the memory manager is able to reserve enough memory for the coming operation.
- Since
- 3.1
Parameter | Description | aTotalSize | total amount of memory |
aChecker | the name of operation |
Returns: result of prechecking, ETrue = successful
PrepareForExit ( )
IMPORT_C void | PrepareForExit | ( | ) | [static] |
Prepare Memory manager for the coming application exit.
- Since
- 3.1
RemoveCollector ( MMemoryCollector * )
unregister a memory collector
- Since
- 3.1
Parameter | Description | aCollector | the collector to be unregistered |
RemoveStopper ( MOOMStopper * )
IMPORT_C void | RemoveStopper | ( | MOOMStopper * | aStopper | ) | [static] |
unregister a stopper
- Since
- 3.1
Parameter | Description | aStopper | the stopper to be unregistered |
ResetOOMDialogDisplayed ( )
IMPORT_C void | ResetOOMDialogDisplayed | ( | ) | [static] |
Reset the OOM dialog display flag in the memorypool; we want to pop the OOM dialog once per page, so we need to clear this when we are either done with the page (it unloads) or when we load a new one, so that it will display again when we run out of memory
- Since
- 9.2
RestoreCollectors ( )
IMPORT_C void | RestoreCollectors | ( | ) | [static] |
Called when application is no longer in OOM situation.
- Since
- 3.1
SetNotifier ( MOOMNotifier * )
set the OOM notifier, memory manager doesn't own this notifier
- Since
- 3.1
Parameter | Description | aNotifier | the notifier |
SetRescueBufferSize ( TInt )
IMPORT_C void | SetRescueBufferSize | ( | TInt | aSize | ) | [static] |
Called when application wants to change the rescue buffer size
- Since
- 3.1
SetStatus ( TOOMCheckResult )
Trigger an OOM event, this function is only for debugging purpose
- Since
- 3.1
Parameter | Description | aType | defines where memory allocation fails |
Status ( )
IMPORT_C TUint | Status | ( | ) | [static] |
Get the status of memory manager, specific state could be retrieve by AND (&) operator with TOOMCheckResult enum
- Since
- 3.1
Returns: the status of memory during this operation.
SwitchToFastAllocator ( )
IMPORT_C RAllocator * | SwitchToFastAllocator | ( | ) | [static] |
switch to the allocator using fast dlmalloc
- Since
- 3.1