[uClibc-cvs] uClibc/libc/stdlib/malloc heap.h,1.14,1.15
Miles Bader
miles at uclibc.org
Mon Sep 22 04:01:14 UTC 2003
Update of /var/cvs/uClibc/libc/stdlib/malloc
In directory winder:/tmp/cvs-serv29422
Modified Files:
heap.h
Log Message:
More fiddling with static free-areas: make sure both their size _and_
their alignment are correct.
Index: heap.h
===================================================================
RCS file: /var/cvs/uClibc/libc/stdlib/malloc/heap.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- heap.h 19 Sep 2003 10:10:33 -0000 1.14
+++ heap.h 22 Sep 2003 04:01:11 -0000 1.15
@@ -78,12 +78,12 @@
#define HEAP_DECLARE_STATIC_FREE_AREA(name, size) \
static struct \
{ \
- HEAP_GRANULARITY_TYPE space[((size) \
- - sizeof (struct heap_free_area) \
- + (HEAP_GRANULARITY - 1)) \
- / HEAP_GRANULARITY]; \
+ HEAP_GRANULARITY_TYPE aligned_space; \
+ char space[HEAP_ADJUST_SIZE(size) \
+ - sizeof (struct heap_free_area) \
+ - HEAP_GRANULARITY]; \
struct heap_free_area _fa; \
- } name = { { (HEAP_GRANULARITY_TYPE)0 }, { (size), 0, 0 } }
+ } name = { (HEAP_GRANULARITY_TYPE)0, "", { HEAP_ADJUST_SIZE(size), 0, 0 } }
/* Rounds SZ up to be a multiple of HEAP_GRANULARITY. */
More information about the uClibc-cvs
mailing list