mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Debug can now be selectively enabled by subystem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@404 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+4
-4
@@ -107,10 +107,10 @@ extern void mm_addregion(FAR void *heapstart, size_t heapsize);
|
||||
|
||||
# define CONFIG_DEBUG
|
||||
|
||||
# undef dbg
|
||||
# define dbg(format, arg...) printf(format, ##arg)
|
||||
# undef vdg
|
||||
# define vdbg(format, arg...) printf(format, ##arg)
|
||||
# undef mdbg
|
||||
# define mdbg(format, arg...) printf(format, ##arg)
|
||||
# undef mvdg
|
||||
# define mvdbg(format, arg...) printf(format, ##arg)
|
||||
|
||||
#else
|
||||
# define mm_errno (*get_errno_ptr())
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ void free(FAR void *mem)
|
||||
FAR struct mm_freenode_s *prev;
|
||||
FAR struct mm_freenode_s *next;
|
||||
|
||||
vdbg("Freeing %p\n", mem);
|
||||
mvdbg("Freeing %p\n", mem);
|
||||
|
||||
/* Protect against attempts to free a NULL reference */
|
||||
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ 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);
|
||||
mlldbg("Region %d: base=%p size=%d\n", IDX+1, heapstart, heapsize);
|
||||
|
||||
/* Add the size of this region to the total size of the heap */
|
||||
|
||||
|
||||
+1
-1
@@ -199,6 +199,6 @@ FAR void *malloc(size_t size)
|
||||
}
|
||||
|
||||
mm_givesemaphore();
|
||||
vdbg("Allocated %p\n", ret);
|
||||
mvdbg("Allocated %p\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user