svn commit: trunk/uClibc/libc/stdlib/malloc
vapier at uclibc.org
vapier at uclibc.org
Sat Aug 5 04:56:37 UTC 2006
Author: vapier
Date: 2006-08-04 21:56:37 -0700 (Fri, 04 Aug 2006)
New Revision: 15785
Log:
merge fix from blackfin cvs:
bernds writes: Use __alignof__ instead of sizeof to get alignments. Eliminates some warnings about misalignments when malloc debugging is enabled.
Modified:
trunk/uClibc/libc/stdlib/malloc/heap.h
trunk/uClibc/libc/stdlib/malloc/malloc.h
Changeset:
Modified: trunk/uClibc/libc/stdlib/malloc/heap.h
===================================================================
--- trunk/uClibc/libc/stdlib/malloc/heap.h 2006-08-05 00:41:39 UTC (rev 15784)
+++ trunk/uClibc/libc/stdlib/malloc/heap.h 2006-08-05 04:56:37 UTC (rev 15785)
@@ -25,7 +25,7 @@
HEAP_GRANULARITY must be a power of 2. Malloc depends on this being the
same as MALLOC_ALIGNMENT. */
#define HEAP_GRANULARITY_TYPE double
-#define HEAP_GRANULARITY (sizeof (HEAP_GRANULARITY_TYPE))
+#define HEAP_GRANULARITY (__alignof__ (HEAP_GRANULARITY_TYPE))
/* A heap is a collection of memory blocks, from which smaller blocks
Modified: trunk/uClibc/libc/stdlib/malloc/malloc.h
===================================================================
--- trunk/uClibc/libc/stdlib/malloc/malloc.h 2006-08-05 00:41:39 UTC (rev 15784)
+++ trunk/uClibc/libc/stdlib/malloc/malloc.h 2006-08-05 04:56:37 UTC (rev 15785)
@@ -12,7 +12,7 @@
*/
/* The alignment we guarantee for malloc return values. */
-#define MALLOC_ALIGNMENT (sizeof (double))
+#define MALLOC_ALIGNMENT (__alignof__ (double))
/* The system pagesize... */
extern size_t __pagesize;
More information about the uClibc-cvs
mailing list