Fix c5471 signal handling + deallocation bug

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@44 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2007-03-08 18:34:11 +00:00
parent 4f27f52615
commit a0dffbf481
12 changed files with 109 additions and 17 deletions
+2
View File
@@ -68,6 +68,8 @@ void free(FAR void *mem)
FAR struct mm_freenode_s *prev;
FAR struct mm_freenode_s *next;
vdbg("Freeing %p\n", mem);
/* Protect against attempts to free a NULL reference */
if (!mem)
+2
View File
@@ -165,6 +165,8 @@ void mm_addregion(FAR void *heapstart, size_t heapsize)
heapend = MM_ALIGN_DOWN((size_t)heapstart + (size_t)heapsize);
heapsize = heapend - heapbase;
lldbg("Region %d: base=%p size=%d\n", IDX+1, heapstart, heapsize);
/* Add the size of this region to the total size of the heap */
g_heapsize += heapsize;
+1
View File
@@ -199,5 +199,6 @@ FAR void *malloc(size_t size)
}
mm_givesemaphore();
vdbg("Allocated %p\n", ret);
return ret;
}