[PATCH 01/13] Move variables to bss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is no need to init variables with 0. So, move them to the bss and let
the C runtime does this job for us.

Signed-off-by: Juergen Beisert <j.beisert@xxxxxxxxxxxxxx>

---
 common/dlmalloc.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: common/dlmalloc.c
===================================================================
--- common/dlmalloc.c.orig
+++ common/dlmalloc.c
@@ -621,20 +621,20 @@ static unsigned long top_pad          = 
 static char* sbrk_base = (char*)(-1);
 
 /* The maximum memory obtained from system via sbrk */
-static unsigned long max_sbrked_mem = 0;
+static unsigned long max_sbrked_mem;
 
 /* The maximum via either sbrk or mmap */
-static unsigned long max_total_mem = 0;
+static unsigned long max_total_mem;
 
 /* internal working copy of mallinfo */
-static struct mallinfo current_mallinfo = {  0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+static struct mallinfo current_mallinfo;
 
 /* The total memory obtained from system via sbrk */
 #define sbrked_mem  (current_mallinfo.arena)
 
 /* Tracking mmaps */
 
-static unsigned long mmapped_mem = 0;
+static unsigned long mmapped_mem;
 
 
 

-- 

_______________________________________________
u-boot-v2 mailing list
u-boot-v2@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/u-boot-v2

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux