0

I am programming a image segmentation algorithm on Android 2.2 platform. When run the following line of code:

double[][] temp=new double[328][576];

there is a out of memory exception.

However, I use the ActivityMannager.getMemoryInfo() to check the available memory space on the system and I find there is still 44851200 bytes free space.

I am confused that why there is a out of memory exception with still free space on the system?

4

1 回答 1

7

Android 对每个进程/应用程序的内存分配有限制。您不能仅将手机上的全部可用内存用于您的应用程序。根据设备,每个进程的最大内存使用都有限制。此链接可能会对您有所帮助。

于 2012-04-19T20:20:01.473 回答