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
This commit is contained in:
bernard.xiong 2009-09-28 07:06:29 +00:00
parent 6a26038b16
commit bd11f44ab4
1 changed files with 2 additions and 2 deletions

View File

@ -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];