david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[malloc] Discard cached items less aggressively

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2012-07-09 09:54:24 +01:00
parent 4a8a7bd91a
commit 8d95e1d6ff
1 changed files with 5 additions and 3 deletions

View File

@ -192,12 +192,14 @@ static inline void valgrind_make_blocks_noaccess ( void ) {
*/
static unsigned int discard_cache ( void ) {
struct cache_discarder *discarder;
unsigned int discarded = 0;
unsigned int discarded;
for_each_table_entry ( discarder, CACHE_DISCARDERS ) {
discarded += discarder->discard();
discarded = discarder->discard();
if ( discarded )
return discarded;
}
return discarded;
return 0;
}
/**