bugAVR C Runtime Library - Bugs: bug #28135, malloc(): expand the last free...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28135: malloc(): expand the last free chunk when expanding __brkval

Submitter:  Aleksandar Kanchev <kanchev>
Submitted:  Mon 30 Nov 2009 10:38:05 PM UTC
   
 
Category:  Library Severity:  3 - Normal
Priority:  5 - Normal Item Group:  libc code
Status:  Works For Me Assigned to:  joerg_wunsch
Percent Complete:  100% Open/Closed:  Closed
Release:  1.7.* Fixed Release:  None

Mon 07 Jun 2010 06:12:41 PM UTC, comment #2: 

Thanks for your analysis and test script.  I added the
(modified) test script, but the patch became obsolete now
as I rewrote free() so it can now return memory back from
the heap.  That looked to be the cleanest solution to me.

Please verify my modifications to your test script match
your intentions.  (I had to modify it since the internals
changed.)

Joerg Wunsch <joerg_wunsch>
Group administrator
Wed 07 Apr 2010 04:18:16 AM UTC, comment #1: 

Assigning to Joerg, as he is the author of the malloc routine here.

Eric Weddington <arcanum>
Group administrator
Mon 30 Nov 2009 10:38:05 PM UTC, original submission:  

This bug covers the situation described in patch #6895 and bug #27235.
I've added an alternative patch for this bug and a test case for regressions.

Quote from patch #6895:
"Situation:
a = malloc(10);
b = malloc(10);
free(b);
Now there is a free chunk at the end of the used area of the heap.
b = malloc(20);
The new request can not be satisfied by any free chunk, therefore the used area needs to be expanded."

Aleksandar Kanchev <kanchev>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #19166:  bug-28135.diff added by kanchev (3KiB - text/x-patch - regression tests for bug 28135)
file #19165:  malloc-expand-last-free-chunk.diff added by kanchev (702B - text/x-patch - make malloc() expand the last free chunk when expanding __brkval)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by arcanum (Updated the item)
  • -email is unavailable- added by kanchev (Submitted the item)
  •  

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-07 joerg_wunsch StatusNone Works For Me
        Open/ClosedOpen Closed
    2010-04-07 arcanum Assigned toNone joerg_wunsch
    2010-01-13 arcanum CategoryNone Library
    2009-11-30 kanchev Attached File- Added bug-28135.diff, #19166
    2009-11-30 kanchev Attached File- Added malloc-expand-last-free-chunk.diff, #19165

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code