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/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev