summaryrefslogtreecommitdiff
path: root/nuttx/mm
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-08 18:34:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-03-08 18:34:11 +0000
commita8872bea509f507b8f595e210e49fd06d8aa0d49 (patch)
tree83f8273dcee57f28f22a6f1b01460125f8135835 /nuttx/mm
parent77f556a36f68292909cd98a7ddeb58c3f739f324 (diff)
downloadpx4-nuttx-a8872bea509f507b8f595e210e49fd06d8aa0d49.tar.gz
px4-nuttx-a8872bea509f507b8f595e210e49fd06d8aa0d49.tar.bz2
px4-nuttx-a8872bea509f507b8f595e210e49fd06d8aa0d49.zip
Fix c5471 signal handling + deallocation bug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@44 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/mm')
-rw-r--r--nuttx/mm/mm_free.c2
-rw-r--r--nuttx/mm/mm_initialize.c2
-rw-r--r--nuttx/mm/mm_malloc.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/nuttx/mm/mm_free.c b/nuttx/mm/mm_free.c
index 276a734d0..4e3233257 100644
--- a/nuttx/mm/mm_free.c
+++ b/nuttx/mm/mm_free.c
@@ -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)
diff --git a/nuttx/mm/mm_initialize.c b/nuttx/mm/mm_initialize.c
index c9c1c4bad..65be6a4b7 100644
--- a/nuttx/mm/mm_initialize.c
+++ b/nuttx/mm/mm_initialize.c
@@ -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;
diff --git a/nuttx/mm/mm_malloc.c b/nuttx/mm/mm_malloc.c
index 05c0f73c8..e9fb96fb5 100644
--- a/nuttx/mm/mm_malloc.c
+++ b/nuttx/mm/mm_malloc.c
@@ -199,5 +199,6 @@ FAR void *malloc(size_t size)
}
mm_givesemaphore();
+ vdbg("Allocated %p\n", ret);
return ret;
}