class RAllocator : public MAllocator |
Base class for heaps.
Public Member Functions | |
---|---|
RAllocator() | |
IMPORT_C TAny * | AllocL(TInt) |
IMPORT_C TAny * | AllocLC(TInt) |
IMPORT_C TAny * | AllocZ(TInt) |
IMPORT_C TAny * | AllocZL(TInt) |
UIMPORT_C void | Check() |
IMPORT_C void | Close() |
IMPORT_C TInt | Count() |
IMPORT_C TInt | Count(TInt &) |
IMPORT_C void | FreeZ(TAny *&) |
IMPORT_C TInt | Open() |
IMPORT_C TAny * | ReAllocL(TAny *, TInt, TInt) |
UIMPORT_C TUint | __DbgCheckFailure() |
UIMPORT_C TInt | __DbgMarkCheck(TBool, TInt, const TDesC8 &, TInt) |
void | __DbgMarkCheck(TBool, TInt, const TUint8 *, TInt) |
UIMPORT_C TUint32 | __DbgMarkEnd(TInt) |
UIMPORT_C void | __DbgMarkStart() |
UIMPORT_C void | __DbgSetAllocFail(TAllocFail, TInt) |
UIMPORT_C void | __DbgSetBurstAllocFail(TAllocFail, TUint, TUint) |
Protected Member Functions | |
---|---|
IMPORT_C void | DoClose() |
UIMPORT_C TInt | Extension_(TUint, TAny *&, TAny *) |
Public Member Enumerations | |
---|---|
enum | TAllocDebugOp { ECount, EMarkStart, EMarkEnd, ECheck, ESetFail, ECopyDebugInfo, ESetBurstFail } |
enum | TAllocFail { ERandom, ETrueRandom, EDeterministic, ENone, EFailNext, EReset, EBurstRandom, EBurstTrueRandom, EBurstDeterministic, EBurstFailNext, ECheckFailure } |
enum | TDbgHeapType { EUser, EKernel } |
enum | TFlags { ESingleThreaded = 1, EFixedSize = 2, ETraceAllocs = 4, EMonitorMemory = 8 } |
enum | TReAllocMode { ENeverMove = 1, EAllowMoveOnShrink = 2 } |
Protected Attributes | |
---|---|
TInt | iAccessCount |
TInt | iCellCount |
TUint32 | iFlags |
TInt | iHandleCount |
TInt * | iHandles |
TInt | iTotalAllocSize |
UIMPORT_C TInt | Extension_ | ( | TUint | aExtensionId, |
TAny *& | a0, | |||
TAny * | a1 | |||
) | [protected, virtual] |
UIMPORT_C TInt | __DbgMarkCheck | ( | TBool | aCountAll, |
TInt | aCount, | |||
const TDesC8 & | aFileName, | |||
TInt | aLineNum | |||
) |
void | __DbgMarkCheck | ( | TBool | aCountAll, |
TInt | aCount, | |||
const TUint8 * | aFileName, | |||
TInt | aLineNum | |||
) | [inline] |
UIMPORT_C void | __DbgSetAllocFail | ( | TAllocFail | aType, |
TInt | aRate | |||
) |
TAllocFail aType | |
TInt aRate |
UIMPORT_C void | __DbgSetBurstAllocFail | ( | TAllocFail | aType, |
TUint | aRate, | |||
TUint | aBurst | |||
) |
TAllocFail aType | |
TUint aRate | |
TUint aBurst |
ECount | |
EMarkStart | |
EMarkEnd | |
ECheck | |
ESetFail | |
ECopyDebugInfo | |
ESetBurstFail |
A set of heap allocation failure flags.
This enumeration indicates how to simulate heap allocation failure.
ERandom |
Attempts to allocate from this heap fail at a random rate; however, the interval pattern between failures is the same every time simulation is started. |
ETrueRandom |
Attempts to allocate from this heap fail at a random rate. The interval pattern between failures may be different every time the simulation is started. |
EDeterministic |
Attempts to allocate from this heap fail at a rate aRate; for example, if aRate is 3, allocation fails at every third attempt. |
ENone |
Cancels simulated heap allocation failure. |
EFailNext |
An allocation from this heap will fail after the next aRate - 1 allocation attempts. For example, if aRate = 1 then the next attempt to allocate from this heap will fail. |
EReset |
Cancels simulated heap allocation failure, and sets the nesting level for all allocated cells to zero. |
EBurstRandom |
aBurst allocations from this heap fail at a random rate; however, the interval pattern between failures is the same every time the simulation is started. |
EBurstTrueRandom |
aBurst allocations from this heap fail at a random rate. The interval pattern between failures may be different every time the simulation is started. |
EBurstDeterministic |
aBurst allocations from this heap fail at a rate aRate. For example, if aRate is 10 and aBurst is 2, then 2 allocations will fail at every tenth attempt. |
EBurstFailNext |
aBurst allocations from this heap will fail after the next aRate - 1 allocation attempts have occurred. For example, if aRate = 1 and aBurst = 3 then the next 3 attempts to allocate from this heap will fail. |
ECheckFailure |
Use this to determine how many times the current debug failure mode has failed so far. RAllocator::__DbgCheckFailure() |
Heap debug checking type flag.
EUser |
The heap is a user heap. |
EKernel |
The heap is the Kernel heap. |
Flags controlling reallocation.
ENeverMove = 1 |
A reallocation of a cell must not change the start address of the cell. |
EAllowMoveOnShrink = 2 |
Allows the start address of the cell to change if the cell shrinks in size. |