diff --git a/jerry-core/config.h b/jerry-core/config.h index e4c085d811..8b6060cddc 100644 --- a/jerry-core/config.h +++ b/jerry-core/config.h @@ -34,11 +34,6 @@ */ #define CONFIG_MEM_POOL_CHUNK_SIZE (8) -/** - * Size of heap chunk - */ -#define CONFIG_MEM_HEAP_CHUNK_SIZE (64) - /** * Size of heap */ diff --git a/jerry-core/jrt/jrt.h b/jerry-core/jrt/jrt.h index d8985e1124..b222df353b 100644 --- a/jerry-core/jrt/jrt.h +++ b/jerry-core/jrt/jrt.h @@ -199,13 +199,6 @@ extern void __noreturn jerry_fatal (jerry_fatal_code_t); * Alignment */ -/** - * Aligns @a value to @a alignment. - * - * Returns maximum positive value, that divides @a alignment and is less than or equal to @a value - */ -#define JERRY_ALIGNDOWN(value, alignment) ((alignment) * ((value) / (alignment))) - /** * Aligns @a value to @a alignment. * diff --git a/jerry-core/mem/mem-config.h b/jerry-core/mem/mem-config.h index 5844eea795..84ed65379a 100644 --- a/jerry-core/mem/mem-config.h +++ b/jerry-core/mem/mem-config.h @@ -28,11 +28,6 @@ */ #define MEM_HEAP_SIZE ((size_t) (CONFIG_MEM_HEAP_AREA_SIZE)) -/** - * Size of heap chunk - */ -#define MEM_HEAP_CHUNK_SIZE ((size_t) (CONFIG_MEM_HEAP_CHUNK_SIZE)) - /** * Size of pool chunk */ diff --git a/jerry-core/mem/mem-heap.c b/jerry-core/mem/mem-heap.c index daf828ae03..a522b2926f 100644 --- a/jerry-core/mem/mem-heap.c +++ b/jerry-core/mem/mem-heap.c @@ -90,12 +90,6 @@ void mem_heap_valgrind_freya_mempool_request (void) # define VALGRIND_FREYA_FREELIKE_SPACE(p) #endif /* JERRY_VALGRIND_FREYA */ -/** - * Chunk size should satisfy the required alignment value - */ -JERRY_STATIC_ASSERT (MEM_HEAP_CHUNK_SIZE % MEM_ALIGNMENT == 0, - MEM_HEAP_CHUNK_SIZE_must_be_multiple_of_MEM_ALIGNMENT); - /* Calculate heap area size, leaving space for a pointer to the free list */ #define MEM_HEAP_AREA_SIZE (MEM_HEAP_SIZE - MEM_ALIGNMENT) #define MEM_HEAP_END_OF_LIST ((mem_heap_free_t *const) ~((uint32_t) 0x0)) @@ -551,17 +545,6 @@ mem_heap_free_block_size_stored (void *ptr) /**< pointer to the memory block */ mem_heap_free_block (original_p, original_p->size); } /* mem_heap_free_block_size_stored */ -/** - * Recommend allocation size based on chunk size. - * - * @return recommended allocation size - */ -size_t __attr_pure___ -mem_heap_recommend_allocation_size (size_t minimum_allocation_size) /**< minimum allocation size */ -{ - return JERRY_ALIGNUP (minimum_allocation_size, MEM_HEAP_CHUNK_SIZE); -} /* mem_heap_recommend_allocation_size */ - /** * Compress pointer * diff --git a/jerry-core/mem/mem-heap.h b/jerry-core/mem/mem-heap.h index 49c3f12245..fc1bd150b7 100644 --- a/jerry-core/mem/mem-heap.h +++ b/jerry-core/mem/mem-heap.h @@ -39,7 +39,6 @@ extern void mem_heap_free_block_size_stored (void *); extern uintptr_t mem_heap_compress_pointer (const void *); extern void *mem_heap_decompress_pointer (uintptr_t); extern bool mem_is_heap_pointer (const void *); -extern size_t __attr_pure___ mem_heap_recommend_allocation_size (size_t); extern void mem_heap_print (); #ifdef MEM_STATS