mirror of https://github.com/ipxe/ipxe.git
[malloc] Discard cached items less aggressively
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/598/head
parent
4a8a7bd91a
commit
8d95e1d6ff
|
@ -192,13 +192,15 @@ static inline void valgrind_make_blocks_noaccess ( void ) {
|
||||||
*/
|
*/
|
||||||
static unsigned int discard_cache ( void ) {
|
static unsigned int discard_cache ( void ) {
|
||||||
struct cache_discarder *discarder;
|
struct cache_discarder *discarder;
|
||||||
unsigned int discarded = 0;
|
unsigned int discarded;
|
||||||
|
|
||||||
for_each_table_entry ( discarder, CACHE_DISCARDERS ) {
|
for_each_table_entry ( discarder, CACHE_DISCARDERS ) {
|
||||||
discarded += discarder->discard();
|
discarded = discarder->discard();
|
||||||
}
|
if ( discarded )
|
||||||
return discarded;
|
return discarded;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discard all cached data
|
* Discard all cached data
|
||||||
|
|
Loading…
Reference in New Issue