Update contrib.
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
17 #ifndef __MMFCONTROLLERHEAP_H__
18 #define __MMFCONTROLLERHEAP_H__
23 To prevent an MMF client with multiple controllers running out of chunks, all
24 controllers for the same client are made to use the same heap.
26 This class controls that shared heap.
28 The iRefCount tracks the number of controllers using the heap.
30 When the client requests a pointer to the heap - RegisterHeap() - it is
31 assumed that a controller will be created using it, so the refcount
32 is automatically incremented. When the controller terminates, the client
33 unregisters - ReleaseHeap() - and the ref count is decreased.
34 When the refcount is zero (no controller threads left) the client deletes
38 const TInt KMMFControllerSharedHeapMaxSize = 0x1000000;//16MB
40 NONSHARABLE_CLASS(CMMFControllerHeap) : public CBase
43 static CMMFControllerHeap* NewL();
44 ~CMMFControllerHeap();
46 RHeap* RegisterHeap();