From 4f5feab5ea962e0889290061d82667d7576f8bab Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Mon, 31 May 2010 19:15:41 +0000 Subject: 2010-05-31 Kazu Hirata * libc/stdlib/mallocr.c (malloc_extend_top): Backport the difference between versions 2.6.4 and 2.6.5. --- newlib/libc/stdlib/mallocr.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'newlib/libc/stdlib') diff --git a/newlib/libc/stdlib/mallocr.c b/newlib/libc/stdlib/mallocr.c index 9588ffd83..ecc445f3d 100644 --- a/newlib/libc/stdlib/mallocr.c +++ b/newlib/libc/stdlib/mallocr.c @@ -8,12 +8,17 @@ int _dummy_mallocr = 1; public domain. Send questions/comments/complaints/performance data to dl@cs.oswego.edu -* VERSION 2.6.4 Thu Nov 28 07:54:55 1996 Doug Lea (dl at gee) +* VERSION 2.6.5 Wed Jun 17 15:55:16 1998 Doug Lea (dl at gee) Note: There may be an updated version of this malloc obtainable at ftp://g.oswego.edu/pub/misc/malloc.c Check before installing! + Note: This version differs from 2.6.4 only by correcting a + statement ordering error that could cause failures only + when calls to this malloc are interposed with calls to + other memory allocators. + * Why use this malloc? This is not the fastest, most space-conserving, most portable, or @@ -2223,11 +2228,11 @@ static void malloc_extend_top(RARG nb) RDECL INTERNAL_SIZE_T nb; /* Also keep size a multiple of MALLOC_ALIGNMENT */ old_top_size = (old_top_size - 3*SIZE_SZ) & ~MALLOC_ALIGN_MASK; + set_head_size(old_top, old_top_size); chunk_at_offset(old_top, old_top_size )->size = SIZE_SZ|PREV_INUSE; chunk_at_offset(old_top, old_top_size + SIZE_SZ)->size = SIZE_SZ|PREV_INUSE; - set_head_size(old_top, old_top_size); /* If possible, release the rest. */ if (old_top_size >= MINSIZE) fREe(RCALL chunk2mem(old_top)); @@ -3606,6 +3611,9 @@ int mALLOPt(RARG param_number, value) RDECL int param_number; int value; History: + V2.6.5 Wed Jun 17 15:57:31 1998 Doug Lea (dl at gee) + * Fixed ordering problem with boundary-stamping + V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee) * Added pvalloc, as recommended by H.J. Liu * Added 64bit pointer support mainly from Wolfram Gloger -- cgit v1.2.3