RGOomMonitorSession Class Reference

class RGOomMonitorSession : public RSessionBase

The client interface for GOOM (Out Of Memory) monitor.

oommonitor.lib

Inherits from

Public Member Functions
IMPORT_C voidAppAboutToStart(TRequestStatus &, const TUid &)
IMPORT_C voidApplicationAboutToStart(const TUid &)
IMPORT_C voidCancelRequestFreeMemory()
IMPORT_C TIntConnect()
IMPORT_C TIntConnect(TRequestStatus &)
IMPORT_C TBoolIsConnected()
IMPORT_C voidMemoryAllocationsComplete()
IMPORT_C TIntRequestFreeMemory(TInt)
IMPORT_C voidRequestFreeMemory(TInt, TRequestStatus &)
IMPORT_C TIntRequestOptionalRam(TInt, TInt, TInt, TInt &)
IMPORT_C voidRequestOptionalRam(TInt, TInt, TInt, TRequestStatus &)
IMPORT_C voidSetGOomPriority(TGOomPriority)
IMPORT_C voidThisAppIsNotExiting(TInt)
IMPORT_C voidUsesAbsoluteMemTargets(TBool)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Public Member Enumerations
enumTGOomPriority { EGOomPriorityNormal = 0, EGOomPriorityHigh, EGOomPriorityBusy }
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TInt iFlags
Inherited Attributes
RHandleBase::iHandle

Member Functions Documentation

AppAboutToStart(TRequestStatus &, const TUid &)

IMPORT_C voidAppAboutToStart(TRequestStatus &aStatus,
const TUid &aAppUid
)

Asynchronous version of AppAboutToStart.

Parameters

TRequestStatus & aStatusrequest status.
const TUid & aAppUidapplication UID being started.

ApplicationAboutToStart(const TUid &)

IMPORT_C voidApplicationAboutToStart(const TUid &aAppUid)

Notify the GOOM monitor that this application about to laucnh effectively set the application specific threshold if found from config file

Parameters

const TUid & aAppUidthe identifier of the application

CancelRequestFreeMemory()

IMPORT_C voidCancelRequestFreeMemory()

Cancels the asynchronous request for free memory.

Connect()

IMPORT_C TIntConnect()

Connects a new session. Sessions must be connected before any other APIs can be used. When the client has finished using a session, Close() must be called.

Connect(TRequestStatus &)

IMPORT_C TIntConnect(TRequestStatus &aStatus)

Asynchronous version of Connect.

Parameters

TRequestStatus & aStatusrequest status, completed later only if return value equals to KErrNone.

IsConnected()

IMPORT_C TBoolIsConnected()

Tells whether Goom FW is really present and connected In some platforms, there's no need for GOOM to run and all operations do just nothing

MemoryAllocationsComplete()

IMPORT_C voidMemoryAllocationsComplete()

Notify the GOOM monitor that this application has finished allocating memory.

RequestFreeMemory(TInt)

IMPORT_C TIntRequestFreeMemory(TIntaBytesRequested)

Request that the GOOM monitor attempts to free some memory. This function may take several seconds to execute, depending on the memory state. It will not return until the attempt to recover memory has completed.

Parameters

TInt aBytesRequestedThe number of bytes of free memory that the client requests.

RequestFreeMemory(TInt, TRequestStatus &)

IMPORT_C voidRequestFreeMemory(TIntaBytesRequested,
TRequestStatus &aStatus
)

Request that the GOOM monitor attempts to free some memory. This is an asynchronous version of the request for free memory.

Parameters

TInt aBytesRequestedThe number of bytes of free memory that the client requests.
TRequestStatus & aStatuswill be completed when the attempt to recover memory has finished. This may take several seconds, depending on the memory state. On completion, aStatus will be set to KErrNone if the request memory is free. KErrNoMemory if that amount of memory could not be recovered.

RequestOptionalRam(TInt, TInt, TInt, TInt &)

IMPORT_C TIntRequestOptionalRam(TIntaBytesRequested,
TIntaMinimumBytesNeeded,
TIntaPluginId,
TInt &aBytesAvailable
)

Request that the GOOM monitor attempts to free some memory for an optional allocation. The passed in plugin ID is used to determine the priority for this allocation. Lower priority OOM actions may be executed to free enough RAM for this allocation. This function may take several seconds to execute, depending on the memory state. It will not return until the attempt to recover memory has completed.

Parameters

TInt aBytesRequestedThe number of bytes of free memory that the client requests.
TInt aMinimumBytesNeeded
TInt aPluginIdThe ID of the plugin that may delete the allocation in event of low memory.
TInt & aBytesAvailable

RequestOptionalRam(TInt, TInt, TInt, TRequestStatus &)

IMPORT_C voidRequestOptionalRam(TIntaBytesRequested,
TIntaMinimumBytesNeeded,
TIntaPluginId,
TRequestStatus &aStatus
)

Request that the GOOM monitor attempts to free some memory for an optional allocation. The passed in plugin ID is used to determine the priority for this allocation. Lower priority OOM actions may be executed to free enough RAM for this allocation. This function may take several seconds to execute, depending on the memory state. It will not return until the attempt to recover memory has completed.

Parameters

TInt aBytesRequestedThe number of bytes of free memory that the client requests.
TInt aMinimumBytesNeeded
TInt aPluginIdThe ID of the plugin that may delete the allocation in event of low memory.
TRequestStatus & aStatusThe TRequestStatus (completes with the number of bytes freed (aStatus >= 0) or an error (aStatus <= 0))

SetGOomPriority(TGOomPriority)

IMPORT_C voidSetGOomPriority(TGOomPriorityaPriority)

Notify the GOOM monitor that this application has the specified priority

Parameters

TGOomPriority aPrioritythe priority of the application

ThisAppIsNotExiting(TInt)

IMPORT_C voidThisAppIsNotExiting(TIntaWgId)

Notify the GOOM monitor that this application is not responding to the EEikCmdExit request to exit the application. This function is used by the Avkon framework's app shutter.

Parameters

TInt aWgIdthe window group identifier of the app that is not exiting.

UsesAbsoluteMemTargets(TBool)

IMPORT_C voidUsesAbsoluteMemTargets(TBoolaUseAbsoluteAmount = ETrue)

Tell goom that number requested by application should be used as such and not combined with currently active global threshold

Parameters

TBool aUseAbsoluteAmount = ETruewhtether global thresholds are combined with targets

Member Enumerations Documentation

Enum TGOomPriority

Defines the application priorities of GOOM monitor.

Enumerators

EGOomPriorityNormal = 0

Application can be closed if needed.

EGOomPriorityHigh

Application should not be closed if possible.

EGOomPriorityBusy

Application is busy and should not be closed.

Member Data Documentation

TInt iFlags

TInt iFlags[private]