Location:
e32std.h
Link against: euser.lib
class UserHeap;
A set of static functions for constructing fixed length heaps and local or global heaps.
Defined in UserHeap
:
ChunkHeap()
, ChunkHeap()
, EChunkHeapDuplicate
, EChunkHeapSwitchTo
, FixedHeap()
, OffsetChunkHeap()
, TChunkHeapCreateMode
static IMPORT_C RHeap *FixedHeap(TAny *aBase, TInt aMaxLength, TInt aAlign=0, TBool aSingleThread=ETrue);
Creates a fixed length heap at a specified location.
On successful return from this function, aMaxLength bytes are committed by the chunk. The heap cannot be extended.
|
|
|
static IMPORT_C RHeap *ChunkHeap(const TDesC *aName, TInt aMinLength, TInt aMaxLength, TInt aGrowBy=1, TInt aAlign=0, TBool
aSingleThread=EFalse);
Creates a heap in a local or global chunk.
The chunk hosting the heap can be local or global.
A local chunk is one which is private to the process creating it and is not intended for access by other user processes. A global chunk is one which is visible to all processes.
The hosting chunk is local, if the pointer aName is NULL, otherwise the hosting chunk is global and the descriptor *aName is assumed to contain the name to be assigned to it.
Ownership of the host chunk is vested in the current process.
A minimum and a maximum size for the heap can be specified. On successful return from this function, the size of the heap is at least aMinLength. If subsequent requests for allocation of memory from the heap cannot be satisfied by compressing the heap, the size of the heap is extended in increments of aGrowBy until the request can be satisfied. Attempts to extend the heap causes the size of the host chunk to be adjusted.
Note that the size of the heap cannot be adjusted by more than aMaxLength.
|
|
|
static IMPORT_C RHeap *ChunkHeap(RChunk aChunk, TInt aMinLength, TInt aGrowBy=1, TInt aMaxLength=0, TInt aAlign=0, TBool aSingleThread=EFalse,
TUint32 aMode=0);
Creates a heap in an existing chunk.
This function is intended to be used to create a heap in a user writable code chunk as created by a call to RChunk::CreateLocalCode()
. This type of heap can be used to hold code fragments from a JIT compiler.
The maximum length to which the heap can grow is the same as the maximum size of the chunk.
|
|
static IMPORT_C RHeap *OffsetChunkHeap(RChunk aChunk, TInt aMinLength, TInt aOffset, TInt aGrowBy=1, TInt aMaxLength=0, TInt
aAlign=0, TBool aSingleThread=EFalse, TUint32 aMode=0);
Creates a heap in an existing chunk, offset from the beginning of the chunk.
This function is intended to be used to create a heap where a fixed amount of additional data must be stored at a known location. The additional data can be placed at the base address of the chunk, allowing it to be located without depending on the internals of the heap structure.
The maximum length to which the heap can grow is the maximum size of the chunk, minus the offset.
|
|