1.1 Custom files
There are two custom files.
1). “custom_gadget_cfg.h” located in custom\app\[*PROJECT_NAME]\
2). “custom_gadget_config.h” located in custom\common
Notice that the precedence of “custom_gadget_cfg.h” is higher than “custom_gadget_config.h”.
Ps. * PROJECT_NAME depends on each project’s naming.
1.2 Options
1.2.1 GADGET_USE_ASM
If Widget uses ASM, this option must be defined. If not, all the memory used by Widget is from a static memory pool.
Example,
#define GADGET_USE_ASM
1.2.2 GADGET_CUSTOM_CFG_SYS_MEM_SIZE
Whether Widget uses ASM or not, it must have a static memory pool for basic operation, for example, installation, entering widget manager and so on. If Widget uses ASM, 200KB static memory shall be enough. If not, it requires a larger size since all used memory is from the static pool.
Example,
#define GADGET_CUSTOM_CFG_SYS_MEM_SIZE (180 * 1024)
1.2.3 GADGET_CUSTOM_CFG_ASM_MEM_SIZE (valid if ASM is used)
If GADGET_USE_ASM is defined, this option will have effect. It is used to configure the size of ASM that Widget needs.
Example,
#define GADGET_CUSTOM_CFG_ASM_MEM_SIZE (2000 * 1024)
1.2.4 GADGE_BROWSER_CONCURRENCE (valid if ASM is used)
This option is used to guarantee the coexistence of Widget and Browser. If defined, it will make sure the ASM pool size is large enough for Widget and Browser concurrently. This can avoid the situation that widget is asked to be closed when user wants to launch the Browser. If GADGE_BROWSER_CONCURRENCE is not defined, the coexistence of widget and browser will be not guaranteed. It depends on how large the ASM is configured.
Example,
#define GADGE_BROWSER_CONCURRENCE
1.3 Make modules
When the configuration is changed, you have to clean and remake custom and applib. This makes the change take effect.
Example,
make c,r custom applib
1.4 Configuration examples
The following shows some examples of configuration.
1.4.1 Widget does not use ASM
#define GADGET_CUSTOM_CFG_SYS_MEM_SIZE (2500 * 1024)
1.4.2 Widget uses ASM
1.4.2.1 Coexistence with Browser is guaranteed
#define GADGET_USE_ASM
#define GADGET_CUSTOM_CFG_SYS_MEM_SIZE (180 * 1024)
#define GADGET_CUSTOM_CFG_ASM_MEM_SIZE (3000 * 1024)
#define GADGE_BROWSER_CONCURRENCE
1.4.2.2 Coexistence with Browser is not guaranteed
#define GADGET_USE_ASM
#define GADGET_CUSTOM_CFG_SYS_MEM_SIZE (180 * 1024)
#define GADGET_CUSTOM_CFG_ASM_MEM_SIZE (3000 * 1024)
Web widget Memory Configuration
原创
©著作权归作者所有:来自51CTO博客作者曹观沧海的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:MTK email
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Eclipse Memory Analyzer使用技巧
Eclipse Memory Analyzer使用技巧
应用程序 内存泄漏 java -
AWTK-WIDGET-WEB-VIEW 实现笔记 (4) - Ubuntu
Ubuntu 上实现 AWTK-WIDGET-WEB-VIEW 开始以为很简单,后来发现是最麻烦的。因为 Ubuntu 上的 webview 库是 以期间踩了几个大坑。
ubuntu webview AWTK Ubuntu 窗口大小 -
AWTK-WIDGET-WEB-VIEW 实现笔记 (2) - Windows
在 Windows 平台上的实现,相对比较顺利,将一个窗口嵌入到另外一个窗口是比较容易的事情。
AWTK webview 子窗口 #include