We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e86d75f + 770b91b commit a33c0deCopy full SHA for a33c0de
src/cache.c
@@ -115,9 +115,12 @@ void git_cache_dispose(git_cache *cache)
115
/* Called with lock */
116
static void cache_evict_entries(git_cache *cache)
117
{
118
- size_t evict_count = 8, i;
+ size_t evict_count = git_cache_size(cache) / 2048, i;
119
ssize_t evicted_memory = 0;
120
121
+ if (evict_count < 8)
122
+ evict_count = 8;
123
+
124
/* do not infinite loop if there's not enough entries to evict */
125
if (evict_count > git_cache_size(cache)) {
126
clear_cache(cache);
0 commit comments