2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-26 03:09:12 +00:00

[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

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;
}
/**