First public contribution.
1 // Copyright (c) 1994-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 the License "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.
14 // e32\include\e32base_private.h
16 // WARNING: This file contains some APIs which are internal and are subject
17 // to change without notice. Such APIs should therefore not be used
18 // outside the Kernel and Hardware Services package.
27 #ifndef __E32BASE_PRIVATE_H__
28 #define __E32BASE_PRIVATE_H__
30 #include <e32std_private.h>
36 struct TObjectDataStr //In use if this slot contains pointer to object.
48 TObjectDataStr str; //This is in use if the slot contains pointer to CObject.
49 TInt nextEmpty; //This is in use if the slot is empty. Points to the next empty slot ...
50 //... in the list. 16 bits would be enough but ARM prefers 32 bytes.
59 class CBitMapAllocator : public CBase
62 IMPORT_C static CBitMapAllocator* New(TInt aSize);
63 IMPORT_C static CBitMapAllocator* NewL(TInt aSize);
64 IMPORT_C ~CBitMapAllocator();
65 IMPORT_C TInt Alloc();
66 IMPORT_C TInt AllocFrom(TInt aPos);
67 IMPORT_C TInt Alloc(TInt aCount, TInt& aConsecutive);
68 IMPORT_C TInt AllocAligned(TInt anAlignment);
69 IMPORT_C TInt AllocAlignedBlock(TInt anAlignment);
70 IMPORT_C TInt AllocFromTop();
71 IMPORT_C TInt AllocFromTopFrom(TInt aPos);
72 IMPORT_C void AllocAt(TInt aPos);
73 IMPORT_C void AllocAt(TInt aPos, TInt aCount);
74 IMPORT_C TBool IsFree(TInt aPos);
75 IMPORT_C TBool IsFree(TInt aPos, TInt aCount);
76 IMPORT_C void Free(TInt aPos);
77 IMPORT_C void Free(TInt aPos, TInt aCount);
78 IMPORT_C TInt Avail();
80 IMPORT_C TInt ExtractRamPages(TInt aConsecutive,TInt& aPageNo);
82 IMPORT_C CBitMapAllocator(TInt aSize,TInt aLength);
91 #endif //__E32BASE_H__