Removing trailing whitespace in liballocator, libecmaobjects and libecmaoperations.
This commit is contained in:
@@ -502,7 +502,7 @@ mem_heap_free_block( uint8_t *ptr) /**< pointer to beginning of data space of th
|
||||
|
||||
/**
|
||||
* Recommend allocation size based on chunk size.
|
||||
*
|
||||
*
|
||||
* @return recommended allocation size
|
||||
*/
|
||||
size_t
|
||||
|
||||
@@ -41,7 +41,7 @@ static void mem_check_pool( mem_pool_state_t *pool_p);
|
||||
|
||||
/**
|
||||
* Initialization of memory pool.
|
||||
*
|
||||
*
|
||||
* Pool will be located in the segment [pool_start; pool_start + pool_size).
|
||||
* Part of pool space will be used for bitmap and the rest will store chunks.
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ mem_pool_init(mem_pool_state_t *pool_p, /**< pool */
|
||||
chunk_index < chunks_number;
|
||||
chunk_index++ )
|
||||
{
|
||||
mem_pool_chunk_index_t *next_free_chunk_index_p =
|
||||
mem_pool_chunk_index_t *next_free_chunk_index_p =
|
||||
(mem_pool_chunk_index_t*) MEM_POOL_CHUNK_ADDRESS( pool_p, chunk_index);
|
||||
|
||||
*next_free_chunk_index_p = (mem_pool_chunk_index_t) (chunk_index + 1u);
|
||||
|
||||
@@ -86,7 +86,7 @@ mem_pools_finalize( void)
|
||||
|
||||
/**
|
||||
* Allocate a chunk of specified size
|
||||
*
|
||||
*
|
||||
* @return pointer to allocated chunk, if allocation was successful,
|
||||
* or NULL - if not enough memory.
|
||||
*/
|
||||
@@ -100,7 +100,7 @@ mem_pools_alloc( void)
|
||||
{
|
||||
/**
|
||||
* Space, at least for header and eight chunks.
|
||||
*
|
||||
*
|
||||
* TODO: Config.
|
||||
*/
|
||||
size_t pool_size = mem_heap_recommend_allocation_size( sizeof(mem_pool_state_t) + 8 * MEM_POOL_CHUNK_SIZE );
|
||||
@@ -122,13 +122,13 @@ mem_pools_alloc( void)
|
||||
mem_pools = pool_state;
|
||||
|
||||
mem_free_chunks_number += pool_state->chunks_number;
|
||||
|
||||
|
||||
mem_pools_stat_alloc_pool();
|
||||
}
|
||||
|
||||
/**
|
||||
* Now there is definitely at least one pool of specified type with at least one free chunk.
|
||||
*
|
||||
*
|
||||
* Search for the pool.
|
||||
*/
|
||||
mem_pool_state_t *pool_state = mem_pools;
|
||||
@@ -249,7 +249,7 @@ static void
|
||||
mem_pools_stat_free_pool( void)
|
||||
{
|
||||
JERRY_ASSERT( mem_pools_stats.pools_count > 0 );
|
||||
|
||||
|
||||
mem_pools_stats.pools_count--;
|
||||
mem_pools_stats.free_chunks = mem_free_chunks_number;
|
||||
} /* mem_pools_stat_free_pool */
|
||||
@@ -261,7 +261,7 @@ static void
|
||||
mem_pools_stat_alloc_chunk(void)
|
||||
{
|
||||
JERRY_ASSERT( mem_pools_stats.free_chunks > 0 );
|
||||
|
||||
|
||||
mem_pools_stats.allocated_chunks++;
|
||||
mem_pools_stats.free_chunks--;
|
||||
|
||||
|
||||
@@ -42,16 +42,16 @@ typedef struct
|
||||
{
|
||||
/** pools' count */
|
||||
size_t pools_count;
|
||||
|
||||
|
||||
/** peak pools' count */
|
||||
size_t peak_pools_count;
|
||||
|
||||
/** allocated chunks count */
|
||||
size_t allocated_chunks;
|
||||
|
||||
|
||||
/** peak allocated chunks count */
|
||||
size_t peak_allocated_chunks;
|
||||
|
||||
|
||||
/** free chunks count */
|
||||
size_t free_chunks;
|
||||
} mem_pools_stats_t;
|
||||
|
||||
Reference in New Issue
Block a user