From a6624c7cb7f47281f01834c00d31322dfe9b16f2 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Tue, 22 Aug 2006 02:42:47 +0000 Subject: Merge from trunk. --- libc/stdlib/malloc/heap.h | 2 +- libc/stdlib/malloc/malloc.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'libc/stdlib/malloc') diff --git a/libc/stdlib/malloc/heap.h b/libc/stdlib/malloc/heap.h index ab1a73896..b66b5ecef 100644 --- a/libc/stdlib/malloc/heap.h +++ b/libc/stdlib/malloc/heap.h @@ -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 diff --git a/libc/stdlib/malloc/malloc.h b/libc/stdlib/malloc/malloc.h index 753205443..b41c4b08e 100644 --- a/libc/stdlib/malloc/malloc.h +++ b/libc/stdlib/malloc/malloc.h @@ -12,11 +12,10 @@ */ /* 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; -libc_hidden_proto(__pagesize) #define MALLOC_PAGE_SIZE __pagesize /* The minimum size of block we request from the the system to extend the -- cgit v1.2.3