提交 052c68d2 编写于 作者: G Gavin1012

expand the heap size to 64kb <wanggang203@huawei.com>

Signed-off-by: NGavin1012 <wanggang203@huawei.com>
上级 ee070bff
......@@ -34,7 +34,7 @@ static void * bms_task_context_alloc (size_t total_size, void *cb_data_p)
*/
void bms_task_context_init (void)
{
jerry_context_t * bms_task_context = jerry_create_context (GT_TASK_HEAP_SIZE * CONVERTION_RATIO,
jerry_context_t * bms_task_context = jerry_create_context (BMS_TASK_HEAP_SIZE * CONVERTION_RATIO,
bms_task_context_alloc, NULL);
jerry_port_default_set_current_context (bms_task_context);
......@@ -60,7 +60,7 @@ static void * js_task_context_alloc (size_t total_size, void *cb_data_p)
*/
void js_task_context_init (void)
{
jerry_context_t * js_task_context = jerry_create_context (GT_TASK_HEAP_SIZE * CONVERTION_RATIO,
jerry_context_t * js_task_context = jerry_create_context (JS_TASK_HEAP_SIZE * CONVERTION_RATIO,
js_task_context_alloc, NULL);
jerry_port_default_set_current_context (js_task_context);
......
......@@ -15,14 +15,23 @@
#define INPUTJS_BUFFER_SIZE (32 * 1024)
#define SNAPSHOT_BUFFER_SIZE (24 * 1024)
#define CONVERTION_RATIO (1024)
#define CONTEXT_SIZE_FOR_TASK (3)
#define GT_TASK_HEAP_SIZE (48)
#define BMS_TASK_FOR_CONTEXT_SIZE (3)
#define BMS_TASK_CONTEXT_AND_HEAP_SIZE (GT_TASK_HEAP_SIZE + BMS_TASK_FOR_CONTEXT_SIZE)
#ifndef BMS_TASK_HEAP_SIZE
#define BMS_TASK_HEAP_SIZE (48)
#endif /* BMS_TASK_HEAP_SIZE */
#define JS_TASK_CONTEXT_AND_HEAP_SIZE_BYTE (51416) // >= 51400 + 8
#define BMS_TASK_CONTEXT_AND_HEAP_SIZE (BMS_TASK_HEAP_SIZE + CONTEXT_SIZE_FOR_TASK)
#endif // JERRY_IAR_JUPITER
#endif // JERRY_FOR_IAR_CONFIG
#ifndef JS_TASK_HEAP_SIZE
#define JS_TASK_HEAP_SIZE (64)
#endif /* JS_TASK_HEAP_SIZE */
// >= 51400 + (64-48) * 1024 + 8
#define JS_TASK_CONTEXT_AND_HEAP_SIZE_BYTE (JS_TASK_HEAP_SIZE * CONVERTION_RATIO + 2248 + 16)
#endif /* JERRY_IAR_JUPITER */
#endif /* JERRY_FOR_IAR_CONFIG */
#endif // CONFIG_JUPITER_H
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册