Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37919 )
Change subject: lib/malloc: Implement a simple free() only for last malloc()
......................................................................
Patch Set 10:
Patch Set 10:
Do you have statistics on different platforms how much memory is successfully freed?
Is there a static code analyser to find missing free calls, now that it's doing something useful?
This allows the code in src/commonlib/storage/storage_write.c to not exhaust the heap. With a simple alloc and free pattern. As for finding leaks of the heap w.r.t. missing free() calls that's a different issue all together. Most of the malloc() calls in coreboot are for longer lifetimes, however when there's a succession of malloc() and free() calls it's easy to exhaust the heap.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/37919
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6d43cf54b79e6897cf6882335730b2310e4eae45
Gerrit-Change-Number: 37919
Gerrit-PatchSet: 10
Gerrit-Owner: Bora Guvendik
bora.guvendik@intel.com
Gerrit-Reviewer: Aaron Durbin
adurbin@chromium.org
Gerrit-Reviewer: Bora Guvendik
bora.guvendik@intel.com
Gerrit-Reviewer: Selma Bensaid
selma.bensaid@intel.com
Gerrit-Reviewer: Subrata Banik
subrata.banik@intel.com
Gerrit-Reviewer: Thejaswani Putta
thejaswani.putta@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Patrick Rudolph
siro@das-labor.org
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Sat, 28 Dec 2019 16:40:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment