[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [patch #6895] Improved malloc behaviour when expanding us
From: |
Stefan Ernst |
Subject: |
[avr-libc-dev] [patch #6895] Improved malloc behaviour when expanding used area |
Date: |
Thu, 13 Aug 2009 13:07:26 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13 (.NET CLR 3.5.30729) |
URL:
<http://savannah.nongnu.org/patch/?6895>
Summary: Improved malloc behaviour when expanding used area
Project: AVR C Runtime Library
Submitted by: sternst
Submitted on: Do 13 Aug 2009 13:07:25 GMT
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This is a patch as a suggestion related to topic #1 in bug report #27235
<https://savannah.nongnu.org/bugs/?27235>
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.
Current code:
The request is satisfied completely with fresh new memory from the expansion.
Result: there is a free chunk between a and b, and the used area is bigger
than necessary.
Patch:
The free chunk at the end of the used area is delivered to the request and
the expansion is made only for the remaining part.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Do 13 Aug 2009 13:07:25 GMT Name: malloc.diff Size: 859B By:
sternst
<http://savannah.nongnu.org/patch/download.php?file_id=18567>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?6895>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-dev] [patch #6895] Improved malloc behaviour when expanding used area,
Stefan Ernst <=