提交 bd11f44a 编写于 作者: B bernard.xiong

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
上级 6a26038b
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册