After #984 we can increase the heap size to 512K
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
+4
-4
@@ -38,9 +38,9 @@
|
|||||||
* Size of heap
|
* Size of heap
|
||||||
*/
|
*/
|
||||||
#ifndef CONFIG_MEM_HEAP_AREA_SIZE
|
#ifndef CONFIG_MEM_HEAP_AREA_SIZE
|
||||||
# define CONFIG_MEM_HEAP_AREA_SIZE (256 * 1024)
|
# define CONFIG_MEM_HEAP_AREA_SIZE (512 * 1024)
|
||||||
#elif CONFIG_MEM_HEAP_AREA_SIZE > (256 * 1024)
|
#elif CONFIG_MEM_HEAP_AREA_SIZE > (512 * 1024)
|
||||||
# error "Currently, maximum 256 kilobytes heap size is supported"
|
# error "Currently, maximum 512 kilobytes heap size is supported"
|
||||||
#endif /* !CONFIG_MEM_HEAP_AREA_SIZE */
|
#endif /* !CONFIG_MEM_HEAP_AREA_SIZE */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
*
|
*
|
||||||
* On the other hand, value 2 ^ CONFIG_MEM_HEAP_OFFSET_LOG should not be less than CONFIG_MEM_HEAP_AREA_SIZE.
|
* On the other hand, value 2 ^ CONFIG_MEM_HEAP_OFFSET_LOG should not be less than CONFIG_MEM_HEAP_AREA_SIZE.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_MEM_HEAP_OFFSET_LOG (18)
|
#define CONFIG_MEM_HEAP_OFFSET_LOG (19)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of lower bits in key of literal hash table.
|
* Number of lower bits in key of literal hash table.
|
||||||
|
|||||||
@@ -202,6 +202,9 @@ mem_heap_init (void)
|
|||||||
JERRY_STATIC_ASSERT ((uintptr_t) mem_heap.area % MEM_ALIGNMENT == 0,
|
JERRY_STATIC_ASSERT ((uintptr_t) mem_heap.area % MEM_ALIGNMENT == 0,
|
||||||
mem_heap_area_must_be_multiple_of_MEM_ALIGNMENT);
|
mem_heap_area_must_be_multiple_of_MEM_ALIGNMENT);
|
||||||
|
|
||||||
|
JERRY_STATIC_ASSERT ((1u << MEM_HEAP_OFFSET_LOG) >= MEM_HEAP_SIZE,
|
||||||
|
two_pow_mem_heap_offset_should_not_be_less_than_mem_heap_size);
|
||||||
|
|
||||||
mem_heap_allocated_size = 0;
|
mem_heap_allocated_size = 0;
|
||||||
mem_heap_limit = CONFIG_MEM_HEAP_DESIRED_LIMIT;
|
mem_heap_limit = CONFIG_MEM_HEAP_DESIRED_LIMIT;
|
||||||
mem_heap.first.size = 0;
|
mem_heap.first.size = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user