关于 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.
[]
更多精彩
赞助商链接