首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian英文资料 >> base >> 正文
Why doesn't Symbian OS support writeable static data?
作者:佚名    文章来源:转载    更新时间:2006-10-16 11:07:44

The main reason writeable static data (WSD) is not supported on Symbian OS, is that it comes at the cost of significant memory wastage. Symbian OS runs in memory constrained devices, so Symbian have made the design decision not to support WSD.

The main sources of memory wastage are discussed below:

1. Requirement for multiple copies of DLLs in RAM
All processes that use a DLL must set the same address for the DLL's static data, because the address is referenced by the shared DLL code. If the required address is free when the process comes to use the DLL, then there is no problem. However it is perfectly possible that the address might not be free, so the copy of the DLL in memory cannot be used.

The workaround is to copy the DLL code and modify the copy to use a different address for static data. Symbian OS does not consider this duplication acceptable.

2. Inefficient use of RAM pages
The amount of memory needed for writable static data by any DLL is likely to be much smaller (<0x100 bytes) than the smallest possible RAM allocation (4K). The remaining memory is wasted. Since the memory is per-process-dll-static-data, the memory wastage on the machine is:
(4K-WSD bytes)*number-client-processes.

相关文章:
DBMS Panics
Tracking down memory leaks
Obtain IMEI number of your symbian phone from Your Go-DB application
Getting Started with Metrowerks Codewarrior
Obtain IMEI number of your symbian phone from Your Go-DB application
How to compile for WINSCW without a CodeWarrior or Visual Studio IDE
How to install UIQ SDK for Metrowerks CodeWarrior and Borland C++BuilderX on a single machine
Building an XML Parser for Symbian
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号