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

 
 

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

Submitted by:  Aleksandar Kanchev <kanchev>
Submitted on:  Mon 30 Nov 2009 10:38:05 PM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: libc code
Status: Works For MePercent Complete: 100%
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed
Release: 1.7.*Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project 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.)

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by arcanum (Updated the item)
  • -unavailable- added by kanchev (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 07 Jun 2010 06:12:41 PM UTCjoerg_wunschStatusNone=>Works For Me
      Open/ClosedOpen=>Closed
    Wed 07 Apr 2010 04:18:16 AM UTCarcanumAssigned toNone=>joerg_wunsch
    Wed 13 Jan 2010 05:02:10 AM UTCarcanumCategoryNone=>Library
    Mon 30 Nov 2009 10:41:39 PM UTCkanchevAttached File-=>Added bug-28135.diff, #19166
    Mon 30 Nov 2009 10:38:05 PM UTCkanchevAttached File-=>Added malloc-expand-last-free-chunk.diff, #19165

    Back to the top


    Powered by Savane 3.1-cleanup1