问题描述
是否有任何方法可以增加设备上Java ME的堆大小?我正在为诺基亚N95开发应用程序,但是当我尝试对较大图像进行图像处理时遇到内存问题.该电话具有足够的可用堆空间,但似乎将Java ME允许使用的大小限制为1MB.
Is there any way to increase the heap size for Java ME on a device? I'm developing an application for a Nokia N95, but am bumping into memory issues when I try to do image processing of larger images. The phone has plenty of heap space available, but seems to restrict the amount allowed to be used by Java ME to 1MB.
推荐答案
简短答案:否.
更长的答案:堆大小在设备VM中进行了硬编码.如果内存不足,则需要将任务拆分为更多较小的子任务,以使GC能够启动.如果内存有限,则只能进行有限的操作.你知道...
Longer answer: Heap-size is hardcoded in device VM. If you are running out of memory you need to split you task into more smaller sub tasks to allow GC to kick in. With limited memory only limited operations are possible. You figure...
这篇关于如何增加Java ME中的堆大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!