Remove high_water from tcache_bin_t.
Remove the high_water field from tcache_bin_t, since it is not useful for anything.
This commit is contained in:
parent
0e8d3d2cb9
commit
50ac670d09
@ -37,7 +37,6 @@ struct tcache_bin_s {
|
|||||||
tcache_bin_stats_t tstats;
|
tcache_bin_stats_t tstats;
|
||||||
# endif
|
# endif
|
||||||
unsigned low_water; /* Min # cached since last GC. */
|
unsigned low_water; /* Min # cached since last GC. */
|
||||||
unsigned high_water; /* Max # cached since last GC. */
|
|
||||||
unsigned ncached; /* # of cached objects. */
|
unsigned ncached; /* # of cached objects. */
|
||||||
unsigned ncached_max; /* Upper limit on ncached. */
|
unsigned ncached_max; /* Upper limit on ncached. */
|
||||||
void *avail; /* Chain of available objects. */
|
void *avail; /* Chain of available objects. */
|
||||||
@ -194,7 +193,6 @@ tcache_event(tcache_t *tcache)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
tbin->low_water = tbin->ncached;
|
tbin->low_water = tbin->ncached;
|
||||||
tbin->high_water = tbin->ncached;
|
|
||||||
|
|
||||||
tcache->next_gc_bin++;
|
tcache->next_gc_bin++;
|
||||||
if (tcache->next_gc_bin == nhbins)
|
if (tcache->next_gc_bin == nhbins)
|
||||||
@ -348,8 +346,6 @@ tcache_dalloc_small(tcache_t *tcache, void *ptr)
|
|||||||
*(void **)ptr = tbin->avail;
|
*(void **)ptr = tbin->avail;
|
||||||
tbin->avail = ptr;
|
tbin->avail = ptr;
|
||||||
tbin->ncached++;
|
tbin->ncached++;
|
||||||
if (tbin->ncached > tbin->high_water)
|
|
||||||
tbin->high_water = tbin->ncached;
|
|
||||||
|
|
||||||
tcache_event(tcache);
|
tcache_event(tcache);
|
||||||
}
|
}
|
||||||
@ -388,8 +384,6 @@ tcache_dalloc_large(tcache_t *tcache, void *ptr, size_t size)
|
|||||||
*(void **)ptr = tbin->avail;
|
*(void **)ptr = tbin->avail;
|
||||||
tbin->avail = ptr;
|
tbin->avail = ptr;
|
||||||
tbin->ncached++;
|
tbin->ncached++;
|
||||||
if (tbin->ncached > tbin->high_water)
|
|
||||||
tbin->high_water = tbin->ncached;
|
|
||||||
|
|
||||||
tcache_event(tcache);
|
tcache_event(tcache);
|
||||||
}
|
}
|
||||||
|
@ -1358,8 +1358,6 @@ arena_tcache_fill_small(arena_t *arena, tcache_bin_t *tbin, size_t binind
|
|||||||
#endif
|
#endif
|
||||||
malloc_mutex_unlock(&bin->lock);
|
malloc_mutex_unlock(&bin->lock);
|
||||||
tbin->ncached = i;
|
tbin->ncached = i;
|
||||||
if (tbin->ncached > tbin->high_water)
|
|
||||||
tbin->high_water = tbin->ncached;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user