Remove memory management-related dead code
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
@@ -34,11 +34,6 @@
|
|||||||
*/
|
*/
|
||||||
#define CONFIG_MEM_POOL_CHUNK_SIZE (8)
|
#define CONFIG_MEM_POOL_CHUNK_SIZE (8)
|
||||||
|
|
||||||
/**
|
|
||||||
* Size of heap chunk
|
|
||||||
*/
|
|
||||||
#define CONFIG_MEM_HEAP_CHUNK_SIZE (64)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Size of heap
|
* Size of heap
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -199,13 +199,6 @@ extern void __noreturn jerry_fatal (jerry_fatal_code_t);
|
|||||||
* Alignment
|
* 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.
|
* Aligns @a value to @a alignment.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -28,11 +28,6 @@
|
|||||||
*/
|
*/
|
||||||
#define MEM_HEAP_SIZE ((size_t) (CONFIG_MEM_HEAP_AREA_SIZE))
|
#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
|
* Size of pool chunk
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -90,12 +90,6 @@ void mem_heap_valgrind_freya_mempool_request (void)
|
|||||||
# define VALGRIND_FREYA_FREELIKE_SPACE(p)
|
# define VALGRIND_FREYA_FREELIKE_SPACE(p)
|
||||||
#endif /* JERRY_VALGRIND_FREYA */
|
#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 */
|
/* 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_AREA_SIZE (MEM_HEAP_SIZE - MEM_ALIGNMENT)
|
||||||
#define MEM_HEAP_END_OF_LIST ((mem_heap_free_t *const) ~((uint32_t) 0x0))
|
#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 (original_p, original_p->size);
|
||||||
} /* mem_heap_free_block_size_stored */
|
} /* 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
|
* Compress pointer
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ extern void mem_heap_free_block_size_stored (void *);
|
|||||||
extern uintptr_t mem_heap_compress_pointer (const void *);
|
extern uintptr_t mem_heap_compress_pointer (const void *);
|
||||||
extern void *mem_heap_decompress_pointer (uintptr_t);
|
extern void *mem_heap_decompress_pointer (uintptr_t);
|
||||||
extern bool mem_is_heap_pointer (const void *);
|
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 ();
|
extern void mem_heap_print ();
|
||||||
|
|
||||||
#ifdef MEM_STATS
|
#ifdef MEM_STATS
|
||||||
|
|||||||
Reference in New Issue
Block a user