[Common-cvs] system symbian.pcf,1.15,1.16
gashish at helixcommunity.org gashish at helixcommunity.orgUpdate of /cvsroot/common/system In directory cvs:/tmp/cvs-serv7990 Modified Files: symbian.pcf Log Message: Synopsis: Handle out of memory error "Nokia is bound by the terms of a commercial contribution agreement with RealNetworks, and I am authorized to contribute this code under said agreement." Modified by: ashish.as.gupta at nokia.com Error ID: TSW ID=EOVL-6GWTZX Reviewed by: Date: 11-17-2005. Project: Helix plugin for Symbian Synopsis: Handle out of memory error Overloaded new operator calls User::Leave on memory allocation failure. This is incorrect as code may not be running under TRAP. This results in panics. Following modifications are made: 1. Change overloaded operators so that User::Leave is not called. Functions should not leave unless they are trapped by higher level code. 2. A new class SymbianMemoryMonitor is added that receives an event from the "new" and other similar overloaded operators. On receiving the event, IHXErrorMessages API will report an error to engine. Ideally, whenever a memory allocation API returns an error, requester should handle the error code but it not the case always. In many cases CHXBuffer::SetSize and similar APIs returned error codes are not always handled by their respective users. 3. SymbainMemoryMonitor is created by MMF-TLC. 4. PrintCurrentState() is not called from so many places. It is only called when we change the state. Files Modified: Image Size and Heap Use impact: minor Platforms and Profiles Build Verified: helix-client-s60-mmf-basic, armv5 Platforms and Profiles Functionality verified: armv5 Branch: HEAD Index: symbian.pcf =================================================================== RCS file: /cvsroot/common/system/symbian.pcf,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- symbian.pcf 11 May 2005 19:31:32 -0000 1.15 +++ symbian.pcf 22 Nov 2005 20:24:12 -0000 1.16 @@ -55,7 +55,8 @@ project.AddSources("platform/symbian/gettickcount.c", "platform/symbian/new.cpp", "platform/symbian/symbian_async_timer_imp.cpp", - "platform/symbian/symbianrecognizer.cpp") + "platform/symbian/symbianrecognizer.cpp", + "platform/symbian/memorymonitor.cpp") # These files have non secure APIs depricated in symbian 9.0 # so they are removed temporarily for symbian 9.0