Browse Source

fix memory static problem

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1232 bbd45198-f89e-11dd-88c7-29a3b14d5316
qiuyiuestc 14 years ago
parent
commit
aa1a78082f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/slab.c

+ 1 - 1
src/slab.c

@@ -839,7 +839,7 @@ void rt_free(void *ptr)
 		kup->size = 0;
 
 #ifdef RT_MEM_STATS
-		used_mem -= size;
+		used_mem -= size * RT_MM_PAGE_SIZE;
 #endif
 		rt_sem_release(&heap_sem);