From: <mar...@us...> - 2011-08-18 21:01:13
|
Revision: 4687 http://navit.svn.sourceforge.net/navit/?rev=4687&view=rev Author: martin-s Date: 2011-08-18 21:01:07 +0000 (Thu, 18 Aug 2011) Log Message: ----------- Fix:Core:Avoid name clash with some libpthread Modified Paths: -------------- trunk/navit/navit/debug.c Modified: trunk/navit/navit/debug.c =================================================================== --- trunk/navit/navit/debug.c 2011-08-18 09:40:58 UTC (rev 4686) +++ trunk/navit/navit/debug.c 2011-08-18 21:01:07 UTC (rev 4687) @@ -287,7 +287,7 @@ int magic; }; -int mallocs,malloc_size,malloc_size_m; +int mallocs,debug_malloc_size,debug_malloc_size_m; void debug_dump_mallocs(void) @@ -314,10 +314,10 @@ if (!size) return NULL; mallocs++; - malloc_size+=size; - if (malloc_size/(1024*1024) != malloc_size_m) { - malloc_size_m=malloc_size/(1024*1024); - dbg(0,"malloced %d kb\n",malloc_size/1024); + debug_malloc_size+=size; + if (debug_malloc_size/(1024*1024) != debug_malloc_size_m) { + debug_malloc_size_m=debug_malloc_size/(1024*1024); + dbg(0,"malloced %d kb\n",debug_malloc_size/1024); } head=malloc(size+sizeof(*head)+sizeof(*tail)); head->magic=0xdeadbeef; @@ -397,7 +397,7 @@ mallocs--; head=(struct malloc_head *)((unsigned char *)ptr-sizeof(*head)); tail=(struct malloc_tail *)((unsigned char *)ptr+head->size); - malloc_size-=head->size; + debug_malloc_size-=head->size; if (head->magic != 0xdeadbeef || tail->magic != 0xdeadbef0) { fprintf(stderr,"Invalid free from %s:%d %s\n",where,line,func); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |