Thursday, January 22, 2015

WHAT IS MEAN BY WRITABLE STATIC DATA IN SYMBIAN?

Writable Staitic Data:
Symbian OS Supports global writable staitic data in EXEs on all versions and handsets.
However writable static data can not be used in DLL on Symbian OS version 8.1a, 8.0a or earlier (KKA1 Architecure was used).
Symbian OS versions 8.0b, 8.1b, 9.0 and beyond do now support the use of writable static data in DLLs, but it is still not recommended, because it is expensive in terms of memory usage.
Note: In order to enable global writable static data on EKA2, the EPOCALLOWDLLDATAkeyword must be added to the MMP file of a DLL
Workaround to avoid writable static data:
1. Thread – local storage:
Thread-local storage is simply a 32-bit pointer, specific to each thread, that can be used to refer to an object which simulates global writable static data. All the global data must be grouped within this single object, which is allocated on the heap on creation of the thread. The
pointer to the object is saved to the thread-local storage pointer, using Dll::SetTls. To access the global data, the code calls Dll::Tls().
2. Client–server framework:
Symbian OS supports writable global static data in EXEs. A common porting strategy is to wrap the code in a Symbian server (which is an EXE), and expose its API as a client interface.

0 comments:

Post a Comment