summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch/symbian
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-11-27 13:51:10 +0100
committermread <qt-info@nokia.com>2010-09-30 15:48:25 +0100
commitc88937dfa5b13df17203c34bec39fe2e03ad8902 (patch)
tree528b4c554fa5fe917958f372572f9e9c90eea896 /src/corelib/arch/symbian
parent9b158b5c64e15b79b4399bd53d026fdaeb492ade (diff)
Fill in some of the missing functions
Task-number: QT-3967 Reviewed-by: mread
Diffstat (limited to 'src/corelib/arch/symbian')
-rw-r--r--src/corelib/arch/symbian/newallocator.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/corelib/arch/symbian/newallocator.cpp b/src/corelib/arch/symbian/newallocator.cpp
index 1bd23c7ec1..69164f90da 100644
--- a/src/corelib/arch/symbian/newallocator.cpp
+++ b/src/corelib/arch/symbian/newallocator.cpp
@@ -503,22 +503,41 @@ TAny* RNewAllocator::ReAlloc(TAny* aPtr, TInt aSize, TInt /*aMode = 0*/)
TInt RNewAllocator::Available(TInt& aBiggestBlock) const
{
+ //struct mallinfo mi = dlmallinfo();
aBiggestBlock = 0;
- return 1000;
+ //return mi.fordblks;
+ return ptrdiff(iTop, iBase) - iTotalAllocSize; //HACK
/*Need to see how to implement this*/
// TODO: return iHeap.Available(aBiggestBlock);
}
TInt RNewAllocator::AllocSize(TInt& aTotalAllocSize) const
{
aTotalAllocSize = iTotalAllocSize;
-// aTotalAllocSize = iChunkSize;
return iCellCount;
}
-TInt RNewAllocator::DebugFunction(TInt /*aFunc*/, TAny* /*a1*/, TAny* /*a2*/)
+TInt RNewAllocator::DebugFunction(TInt aFunc, TAny* a1, TAny* /*a2*/)
{
- return 0;
+ TInt r = KErrNotSupported;
+ TInt* a1int = reinterpret_cast<TInt*>(a1);
+ switch(aFunc) {
+ case RAllocator::ECount:
+ {
+ struct mallinfo mi = dlmallinfo();
+ *a1int = mi.fordblks;
+ r = mi.uordblks;
+ }
+ break;
+ case RAllocator::EMarkStart:
+ case RAllocator::EMarkEnd:
+ case RAllocator::ESetFail:
+ case RAllocator::ECheck:
+ r = KErrNone;
+ break;
+ }
+ return r;
}
+
TInt RNewAllocator::Extension_(TUint /* aExtensionId */, TAny*& /* a0 */, TAny* /* a1 */)
{
return KErrNotSupported;
@@ -2862,7 +2881,7 @@ TInt RNewAllocator::CreateThreadHeap(SStdEpocThreadCreateInfo& aInfo, RNewAlloca
* Called from the qtmain.lib application wrapper.
* Create a new heap as requested, but use the new allocator
*/
-Q_CORE_EXPORT TInt qt_symbian_SetupThreadHeap(TBool aNotFirst, SStdEpocThreadCreateInfo& aInfo)
+Q_CORE_EXPORT TInt qt_symbian_SetupThreadHeap(TBool /*aNotFirst*/, SStdEpocThreadCreateInfo& aInfo)
{
TInt r = KErrNone;
if (!aInfo.iAllocator && aInfo.iHeapInitialSize>0)