diff options
| author | [email protected] <[email protected]> | 2012-12-20 07:25:19 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-12-20 07:25:19 +0000 |
| commit | 0e40d55d9f6894aec2dfc844e8ea89756b0306fe (patch) | |
| tree | 6e8b5aeb4b1c4e9dc424918a1a9a2f9439c7ee2b /src/mem.c | |
| parent | ba4aa585a464893b01279d8724142002930f73b7 (diff) | |
fixed the coding style of RT_DEBUG_LOG
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2500 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'src/mem.c')
| -rw-r--r-- | src/mem.c | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -190,8 +190,8 @@ void rt_system_heap_init(void *begin_addr, void *end_addr) /* point to begin address of heap */ heap_ptr = (rt_uint8_t *)begin_align; - RT_DEBUG_LOG(RT_DEBUG_MEM, - ("mem init, heap begin address 0x%x, size %d\n", (rt_uint32_t)heap_ptr, mem_size_aligned)); + RT_DEBUG_LOG(RT_DEBUG_MEM, ("mem init, heap begin address 0x%x, size %d\n", + (rt_uint32_t)heap_ptr, mem_size_aligned)); /* initialize the start of the heap */ mem = (struct heap_mem *)heap_ptr; @@ -237,7 +237,8 @@ void *rt_malloc(rt_size_t size) return RT_NULL; if (size != RT_ALIGN(size, RT_ALIGN_SIZE)) - RT_DEBUG_LOG(RT_DEBUG_MEM, ("malloc size %d, but align to %d\n", size, RT_ALIGN(size, RT_ALIGN_SIZE))); + RT_DEBUG_LOG(RT_DEBUG_MEM, ("malloc size %d, but align to %d\n", + size, RT_ALIGN(size, RT_ALIGN_SIZE))); else RT_DEBUG_LOG(RT_DEBUG_MEM, ("malloc size %d\n", size)); @@ -335,9 +336,10 @@ void *rt_malloc(rt_size_t size) RT_ASSERT((rt_uint32_t)((rt_uint8_t *)mem + SIZEOF_STRUCT_MEM) % RT_ALIGN_SIZE == 0); RT_ASSERT((((rt_uint32_t)mem) & (RT_ALIGN_SIZE-1)) == 0); - RT_DEBUG_LOG(RT_DEBUG_MEM, ("allocate memory at 0x%x, size: %d\n", - (rt_uint32_t)((rt_uint8_t *)mem + SIZEOF_STRUCT_MEM), - (rt_uint32_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr)))); + RT_DEBUG_LOG(RT_DEBUG_MEM, + ("allocate memory at 0x%x, size: %d\n", + (rt_uint32_t)((rt_uint8_t *)mem + SIZEOF_STRUCT_MEM), + (rt_uint32_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr)))); RT_OBJECT_HOOK_CALL(rt_malloc_hook, (((void*)((rt_uint8_t *)mem + SIZEOF_STRUCT_MEM)), size)); @@ -503,9 +505,10 @@ void rt_free(void *rmem) /* Get the corresponding struct heap_mem ... */ mem = (struct heap_mem *)((rt_uint8_t *)rmem - SIZEOF_STRUCT_MEM); - RT_DEBUG_LOG(RT_DEBUG_MEM, ("release memory 0x%x, size: %d\n", - (rt_uint32_t)rmem, - (rt_uint32_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr)))); + RT_DEBUG_LOG(RT_DEBUG_MEM, + ("release memory 0x%x, size: %d\n", + (rt_uint32_t)rmem, + (rt_uint32_t)(mem->next - ((rt_uint8_t *)mem - heap_ptr)))); /* protect the heap from concurrent access */ |
