TChunkCreateInfo Struct Reference

#include <e32std.h>

struct TChunkCreateInfo

Detailed Description

This structure specifies the type and properties of the chunk to be created. It is passed as a parameter to the RChunk::Create() method.

Member Attribute Documentation

iAttributes

TUint iAttributes[protected]

Attributes to the chunk to be created should have. Should be set from one or more the values in TChunkCreate::TChunkCreateAtt.

iClearByte

TUint8 iClearByte[protected]

The byte to clear all the memory committed to the chunk to.

iGlobal

TBool iGlobal[protected]

Specify if chunk is global or not.

iInitialBottom

TInt iInitialBottom[protected]

The offset of the bottom of the region to commit to the chunk on creation from the base of the chunk's reserved region. This is only used for double ended and disconnected chunks.

iInitialTop

TInt iInitialTop[protected]

The offset of the top of the region to commit to the chunk on creation from the base of the chunk's reserved region. This is only used for double ended and disconnected chunks.

iMaxSize

TInt iMaxSize[protected]

The maximum size in bytes of the chunk to be created.

iName

const TDesC *iName[protected]

A pointer to a descriptor containing the name to be assigned to global chunks. The length of the descriptor must be no greater than that allowed for a TKName type. Must be NULL for local chunks.

iOwnerType

TOwnerType iOwnerType[protected]

An enumeration whose enumerators define the ownership of this chunk handle. If not explicitly specified, EOwnerProcess is taken as default.

iSpare1

TUint8 iSpare1[protected]

iSpare2

TUint iSpare2[protected]

iType

TUint iType[protected]

The type of the chunk to be created.

iVersionNumber

TUint iVersionNumber[protected]

The version number of this TChunkCreateInfo.

Member Enumeration Documentation

Enum TChunkCreateVersions

Currently supported version numbers

EnumeratorValueDescription
EVersion0
ESupportedVersions

Enum TChunkPagingAtt

Attributes that specify whether the chunk to be created is data paged or not.

EnumeratorValueDescription
EUnspecified

The chunk will use the creating process's paging attributes.

EPaged

The chunk will be data paged.

EUnpaged

The chunk will not be data paged.

Constructor & Destructor Documentation

TChunkCreateInfo ( )

IMPORT_CTChunkCreateInfo()

Default constructor.

This defaults the chunk to be created to be local, to have no attributes set and to use the default clear byte.

A local chunk is private to the process creating it and is not intended for access by other user processes.

Member Function Documentation

SetCache ( TInt )

IMPORT_C voidSetCache(TIntaMaxSize)

For use by file server only.

SetClearByte ( TUint8 )

IMPORT_C voidSetClearByte(TUint8aClearByte)

Sets the byte value that all memory committed to the chunk will be cleared to.

SetCode ( TInt, TInt )

IMPORT_C voidSetCode(TIntaInitialSize,
TIntaMaxSize
)

Sets the chunk to be created to be user writable and to be marked by the kernel as containing code. This can only be set on local chunks.

See also: RChunk::CreateLocalCode()

ParameterDescription
aInitialSizeThe number of bytes committed to this chunk.
aMaxSizeThe maximum size to which the reserved region of this chunk can grow.

SetDisconnected ( TInt, TInt, TInt )

IMPORT_C voidSetDisconnected(TIntaInitialBottom,
TIntaInitialTop,
TIntaMaxSize
)

Set the chunk to be created to have a committed region consisting of an arbitrary set of MMU pages within the reserved region.

See also: RChunk::CreateDisconnectedLocal()

ParameterDescription
aInitialBottomThe offset of the bottom of the new committed region from the base of the chunk's reserved region.
aInitialTopThe offset of the top of the new committed region from the base of the chunk's reserved region.
aMaxSizeThe maximum size to which the reserved region of this chunk can grow.

SetDoubleEnded ( TInt, TInt, TInt )

IMPORT_C voidSetDoubleEnded(TIntaInitialBottom,
TIntaInitialTop,
TIntaMaxSize
)

Sets the chunk to be created to have a commited region that that can be any contiguous subset of the reserved region.

See also: RChunk::CreateDoubleEndedLocal()

ParameterDescription
aInitialBottomThe offset of the bottom of the new committed region from the base of the chunk's reserved region.
aInitialTopThe offset of the top of the new committed region from the base of the chunk's reserved region.
aMaxSizeThe maximum size to which the reserved region of this chunk can grow.

SetGlobal ( const TDesC & )

IMPORT_C voidSetGlobal(const TDesC &aName)

Sets the chunk to be created to be global, i.e. it is potentially visible to all processes and is intended for access by other user processes.

ParameterDescription
aNameA reference to a descriptor containing the name to be assigned to the global chunk. The length of the descriptor must be no greater than that allowed for a TKName type.

SetNormal ( TInt, TInt )

IMPORT_C voidSetNormal(TIntaInitialSize,
TIntaMaxSize
)

Sets the chunk to be created to have a committed region that always starts at the bottom of the reserved region.

See also: RChunk::CreateLocal()

ParameterDescription
aMaxSizeThe maximum size to which the reserved region of this chunk can grow.

SetOwner ( TOwnerType )

IMPORT_C voidSetOwner(TOwnerTypeaType)

Sets the owner of the chunk to be created.

ParameterDescription
aTypeThe owner of the chunk to be created.

SetPaging ( const TChunkPagingAtt )

IMPORT_C voidSetPaging(const TChunkPagingAttaPaging)

Sets the data paging attributes for the chunk to be created. Any previous calls to this method will be overridden for this TChunkCreateInfo object.

ParameterDescription
aPagingThe data paging attributes of the chunk to be created.

SetReadOnly ( )

IMPORT_C voidSetReadOnly()

Sets the global chunk to be created to be read only. Only the creating process will be able to write to it, not other processes.

Read-Only chunks are currently only available on the Flexible Memory Model.

Chunk must be global.

SetThreadHeap ( TInt, TInt, const TDesC & )

voidSetThreadHeap(TIntaInitialSize,
TIntaMaxSize,
const TDesC &aName
)

Sets the chunk to be created to be a thread heap chunk. For internal use only.

ParameterDescription
aInitialSizeThe number of bytes committed to this chunk.
aMaxSizeThe maximum size to which the reserved region of this chunk can grow.
aNameThe name to be given to the chunk to be created