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.

No, I don't have statistics information, as Aaron mentioned, this is needed so that we don't run out of heap while using storage_block_fill_write().

View Change

To view, visit change 37919. To unsubscribe, or for help writing mail filters, visit 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: Thu, 02 Jan 2020 18:21:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment