Browse Source

fix the memory statistic issue in rt_realloc function.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@53 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong 15 years ago
parent
commit
bd11f44ab4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/mem.c

+ 2 - 2
src/mem.c

@@ -371,9 +371,9 @@ void *rt_realloc(void *rmem, rt_size_t newsize)
 
 	if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE < size)
 	{
-#if MEM_STATS
+#ifdef RT_MEM_STATS
   		used_mem -= (size - newsize);
-#endif /* MEM_STATS */
+#endif
 
 		ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize;
 		mem2 = (struct heap_mem *)&heap_ptr[ptr2];