WEB开发网
开发学院手机开发Android 开发 关于 Android memory heap 阅读

关于 Android memory heap

 2010-05-31 14:43:00 来源:WEB开发网   
核心提示:In frameworks/base/core/jni/AndroidRuntime.cpp:#ifdef CUSTOM_RUNTIME_HEAP_MAX#define __make_max_heap_opt(val) #val#define _make_max_heap_opt(val) "-Xmx&quo

In frameworks/base/core/jni/AndroidRuntime.cpp:

#ifdef CUSTOM_RUNTIME_HEAP_MAX

#define __make_max_heap_opt(val) #val

#define _make_max_heap_opt(val) "-Xmx" __make_max_heap_opt(val)

opt.optionString = _make_max_heap_opt(CUSTOM_RUNTIME_HEAP_MAX);

#undef __make_max_heap_opt

#undef _make_max_heap_opt

#else

/* limit memory use to 16MB */

opt.optionString = "-Xmx16m";

#endif

So you can define a CUSTOM_RUNTIME_HEAP_MAX with some other value,

e.g. "32m" to double the existing limit.

Tags:关于 Android memory

编辑录入:coldstar [复制链接] [打 印]
赞助商链接