Remove inline from mem_GetChunkSize and mem-heap internal static functions.

This commit is contained in:
Ruben Ayrapetyan 2014-07-09 19:15:51 +04:00
parent c5d72afa79
commit c54370bfec
2 changed files with 7 additions and 7 deletions

View File

@ -96,9 +96,9 @@ typedef struct
*/ */
mem_HeapState_t mem_Heap; mem_HeapState_t mem_Heap;
static inline size_t mem_get_block_chunks_count( const mem_BlockHeader_t *block_header_p); static size_t mem_get_block_chunks_count( const mem_BlockHeader_t *block_header_p);
static inline size_t mem_get_block_data_space_size( const mem_BlockHeader_t *block_header_p); static size_t mem_get_block_data_space_size( const mem_BlockHeader_t *block_header_p);
static inline size_t mem_get_block_chunks_count_from_data_size( size_t block_allocated_size); static size_t mem_get_block_chunks_count_from_data_size( size_t block_allocated_size);
static void mem_InitBlockHeader( uint8_t *pFirstChunk, static void mem_InitBlockHeader( uint8_t *pFirstChunk,
size_t sizeInChunks, size_t sizeInChunks,
@ -131,7 +131,7 @@ static void mem_HeapStatFreeBlockMerge( void);
* *
* @return chunks count * @return chunks count
*/ */
static inline size_t static size_t
mem_get_block_chunks_count( const mem_BlockHeader_t *block_header_p) /**< block header */ mem_get_block_chunks_count( const mem_BlockHeader_t *block_header_p) /**< block header */
{ {
JERRY_ASSERT( block_header_p != NULL ); JERRY_ASSERT( block_header_p != NULL );
@ -158,7 +158,7 @@ mem_get_block_chunks_count( const mem_BlockHeader_t *block_header_p) /**< block
* *
* @return size of block area that can be used to store data * @return size of block area that can be used to store data
*/ */
static inline size_t static size_t
mem_get_block_data_space_size( const mem_BlockHeader_t *block_header_p) /**< block header */ mem_get_block_data_space_size( const mem_BlockHeader_t *block_header_p) /**< block header */
{ {
return mem_get_block_chunks_count( block_header_p) * MEM_HEAP_CHUNK_SIZE - sizeof (mem_BlockHeader_t); return mem_get_block_chunks_count( block_header_p) * MEM_HEAP_CHUNK_SIZE - sizeof (mem_BlockHeader_t);
@ -169,7 +169,7 @@ mem_get_block_data_space_size( const mem_BlockHeader_t *block_header_p) /**< blo
* *
* @return chunks count * @return chunks count
*/ */
static inline size_t static size_t
mem_get_block_chunks_count_from_data_size( size_t block_allocated_size) /**< size of block's allocated area */ mem_get_block_chunks_count_from_data_size( size_t block_allocated_size) /**< size of block's allocated area */
{ {
return JERRY_ALIGNUP( sizeof (mem_BlockHeader_t) + block_allocated_size, MEM_HEAP_CHUNK_SIZE) / MEM_HEAP_CHUNK_SIZE; return JERRY_ALIGNUP( sizeof (mem_BlockHeader_t) + block_allocated_size, MEM_HEAP_CHUNK_SIZE) / MEM_HEAP_CHUNK_SIZE;

View File

@ -56,7 +56,7 @@ typedef enum {
* *
* @return size (in bytes) of chunk of specified type * @return size (in bytes) of chunk of specified type
*/ */
static inline size_t static size_t
mem_GetChunkSize( mem_PoolChunkType_t chunkType) /**< chunk type */ mem_GetChunkSize( mem_PoolChunkType_t chunkType) /**< chunk type */
{ {
uint32_t chunkTypeId = (uint32_t) chunkType; uint32_t chunkTypeId = (uint32_t) chunkType;