mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 17:41:55 +00:00
[malloc] Discard cached items less aggressively
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
4a8a7bd91a
commit
8d95e1d6ff
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user