开发学院手机开发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 [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接