Speeding up procedure for getting start of a heap block's data space for one-chunked blocks, removing general blocks support from the procedure.
- heap area is aligned on heap chunk size; - mem_heap_get_block_start is renamed to mem_heap_get_chunked_block_start, now this interface is applicable only to one-chunked blocks, and is significantly faster - instead of iterating list of heap blocks to find block header, it just aligns value of pointer to heap chunk size. JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
/**
|
||||
* Area for heap
|
||||
*/
|
||||
static uint8_t mem_heap_area[ MEM_HEAP_AREA_SIZE ] __attribute__ ((aligned (MEM_ALIGNMENT)));
|
||||
static uint8_t mem_heap_area[ MEM_HEAP_AREA_SIZE ] __attribute__ ((aligned (JERRY_MAX (MEM_ALIGNMENT,
|
||||
MEM_HEAP_CHUNK_SIZE))));
|
||||
|
||||
/**
|
||||
* The 'try to give memory back' callback
|
||||
|
||||
Reference in New Issue
Block a user