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:
Ruben Ayrapetyan
2015-05-14 22:15:45 +03:00
parent 253e172127
commit 82f9afcde9
4 changed files with 77 additions and 39 deletions
+2 -1
View File
@@ -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