黑莓手机的内存使用情况 [英] BlackBerry memory usage

查看:116
本文介绍了黑莓手机的内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找在移动设备上,黑莓尤其是内存使用一些建议。使用一些分析工具,我们计算了525KB的RAM工作集的大小。问题是,我们真的不知道这是否是可接受的,或者是否过高?

I am looking for some advice on memory usage on mobile devices, BlackBerry in particular. Using some profiling tools we have calculated a working set size in RAM of 525kb. Problem is we don't really know whether this is acceptable or too high ?

谁能给任何洞察与黑莓手机的内存使用自己的经验?我们应该是一个什么样数去向何方?

Can anyone give any insight into their own experience with memory usage on BlackBerry? What sort of number should we be aiming for?

我也想知道,我们应该寻找什么样的东西出来特别是减少内存使用。

I am also wondering what sort of things we should be looking out for in particular to reduce memory usage.

推荐答案

512KB是在目前这一​​代的黑莓设备完全可以接受的。你可以看看的JBenchmark ,看看具体的JVM堆,你可以期望每个模型,但没有的目前设备那里去下面堆20MB。大多数都比大得多。

512KB is perfectly acceptable on the current generation of BlackBerrys devices. You can take a look at JBenchmark to see the exact JVM heap you can expect for each model, but none of the current devices out there go below 20MB of heap. Most are much larger than that.

在的JBenchmark你可以选择你是从下拉兴趣倒在页面右侧的设备。然后,导航到JVM选项卡的设备。

On JBenchmark you can choose the device you are interested from a drop down on the right side of the page. Then, navigate to the JVM Tab for the device.

当涉及到减少内存使用情况我就不会担心使用此应用程序的总字节数,如果你是真正的内嵌525K,几乎是如何经常​​需要分配/再分配。尝试尽可能池/再利用的对象,避免任何不需要的配置。例如,使用StringBuffer类来连接字符串,而不是运营商为多个String对象为每个级联使用的运算符,其中一个StringBuffer将只是把字符数组,并仅在需要时扩大创建。谷歌是找到更多的技巧的好方法。

When it comes to reducing memory usage I wouldn't worry about the total bytes used for this application if you are truly inline with 525K, just about how often allocation/reallocation is required. Try to pool/reuse objects as much as possible, avoiding any unneeded allocation. For instance, use the StringBuffer class to concatenate strings instead of operators as multiple String objects will be created for each concatenation using the operator, where a StringBuffer will just put the characters in an array and only expand when needed. Google is a good way to find more tips.

最后,依靠分析工具,将BlackBerry JDE了,是理解你究竟是如何优化堆内存使用量非常重要的一部分。

Finally, relying on profiling tools, which the BlackBerry JDE has, is a very important part of understanding exactly how you can optimize heap memory usage.

这篇关于黑莓手机的内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆