WinCE 5.0“应用程序连续运行时 SRAM 耗尽”
请帮助解决 WinCE 5.0 设备中的以下场景
我正在使用注册表双字来存储大约 30 个值。
这些注册表值每分钟都会更新(没有新的密钥创建,只是更新)。
现在我使用以下 API 来获取可用字节
public static extern bool GetDiskFreeSpaceEx(string lpDirectoryName, out ulong lpFreeBytesAvailable, out ulong lpTotalNumberOfBytes, out ulong lpTotalNumberOfFreeBytes);
结果是,在进行大约 77K 次密钥更新后,我丢失了大约 23 KB 的内存(可用字节总数为减少了 23 KB)。
即使重新启动设备后,我发现这 23 KB 没有保留(它们丢失了)。
请帮忙解答以下问题
=> SRAM耗尽的原因是什么
=>如何找回失去的记忆。
Please help with the following scenario in a WinCE 5.0 device
I am using registry dword's to store some 30 values.
These registry values are getting updated every minute (no new key creation, its just updation).
Now I use the following API to get the bytes available
public static extern bool GetDiskFreeSpaceEx(string lpDirectoryName, out ulong lpFreeBytesAvailable, out ulong lpTotalNumberOfBytes, out ulong lpTotalNumberOfFreeBytes);
The findings are that after doing the keys updation for around 77K times, I lose some 23 KB of memory (total number of free bytes is 23 KB less).
Even after restarting the device, I am seeing that those 23 KB are not retained (They are lost).
Please help with the following questions
=> What is the reason of depleted SRAM
=> How to reclaim this lost memory.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能有一个基于 Hive 的注册表,并且操作系统正在存储基本启动注册表中的增量。稳定在23k吗? 23k真的重要吗?如果随着时间的推移你不会泄漏内存,那还有什么可担心的呢?
It's likely that you have a Hive-based registry and the OS is storing the deltas from the base startup registry. Does it stay steady at 23k? Does 23k really matter? If you're not leaking memory over time, then what's the worry?