Why doesn't Symbian OS support writeable static data?

本文探讨了Symbian OS为何不支持可写静态数据(WSD)。主要原因在于支持WSD会导致内存浪费,对于运行在内存受限设备上的Symbian OS来说,这将是一个不可接受的问题。文章详细解释了两个主要的内存浪费来源:需要为多个进程复制DLL,并且RAM页面使用效率低下。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 Why doesn't Symbian OS support writeable static data?

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.

<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript> </script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值