diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-11-27 12:51:10 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2010-09-30 14:48:25 (GMT) |
commit | c88937dfa5b13df17203c34bec39fe2e03ad8902 (patch) | |
tree | 528b4c554fa5fe917958f372572f9e9c90eea896 /src/corelib/arch | |
parent | 9b158b5c64e15b79b4399bd53d026fdaeb492ade (diff) | |
download | Qt-c88937dfa5b13df17203c34bec39fe2e03ad8902.zip Qt-c88937dfa5b13df17203c34bec39fe2e03ad8902.tar.gz Qt-c88937dfa5b13df17203c34bec39fe2e03ad8902.tar.bz2 |
Fill in some of the missing functions
Task-number: QT-3967
Reviewed-by: mread
Diffstat (limited to 'src/corelib/arch')
-rw-r--r-- | src/corelib/arch/symbian/newallocator.cpp | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/corelib/arch/symbian/newallocator.cpp b/src/corelib/arch/symbian/newallocator.cpp index 1bd23c7..69164f9 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) |