Remove unnecessary parameters for cache_bin_postincrement.
This commit is contained in:
parent
7d9eceaf38
commit
fbca96c433
@ -691,8 +691,7 @@ void cache_bin_info_compute_alloc(cache_bin_info_t *infos, szind_t ninfos,
|
|||||||
*/
|
*/
|
||||||
void cache_bin_preincrement(cache_bin_info_t *infos, szind_t ninfos,
|
void cache_bin_preincrement(cache_bin_info_t *infos, szind_t ninfos,
|
||||||
void *alloc, size_t *cur_offset);
|
void *alloc, size_t *cur_offset);
|
||||||
void cache_bin_postincrement(cache_bin_info_t *infos, szind_t ninfos,
|
void cache_bin_postincrement(void *alloc, size_t *cur_offset);
|
||||||
void *alloc, size_t *cur_offset);
|
|
||||||
void cache_bin_init(cache_bin_t *bin, cache_bin_info_t *info, void *alloc,
|
void cache_bin_init(cache_bin_t *bin, cache_bin_info_t *info, void *alloc,
|
||||||
size_t *cur_offset);
|
size_t *cur_offset);
|
||||||
|
|
||||||
|
@ -56,8 +56,7 @@ cache_bin_preincrement(cache_bin_info_t *infos, szind_t ninfos, void *alloc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cache_bin_postincrement(cache_bin_info_t *infos, szind_t ninfos, void *alloc,
|
cache_bin_postincrement(void *alloc, size_t *cur_offset) {
|
||||||
size_t *cur_offset) {
|
|
||||||
*(uintptr_t *)((byte_t *)alloc + *cur_offset) =
|
*(uintptr_t *)((byte_t *)alloc + *cur_offset) =
|
||||||
cache_bin_trailing_junk;
|
cache_bin_trailing_junk;
|
||||||
*cur_offset += sizeof(void *);
|
*cur_offset += sizeof(void *);
|
||||||
|
@ -698,8 +698,7 @@ tcache_init(tsd_t *tsd, tcache_slow_t *tcache_slow, tcache_t *tcache,
|
|||||||
assert(tcache_small_bin_disabled(i, cache_bin));
|
assert(tcache_small_bin_disabled(i, cache_bin));
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_bin_postincrement(tcache_bin_info, nhbins, mem,
|
cache_bin_postincrement(mem, &cur_offset);
|
||||||
&cur_offset);
|
|
||||||
/* Sanity check that the whole stack is used. */
|
/* Sanity check that the whole stack is used. */
|
||||||
assert(cur_offset == tcache_bin_alloc_size);
|
assert(cur_offset == tcache_bin_alloc_size);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ test_bin_init(cache_bin_t *bin, cache_bin_info_t *info) {
|
|||||||
size_t cur_offset = 0;
|
size_t cur_offset = 0;
|
||||||
cache_bin_preincrement(info, 1, mem, &cur_offset);
|
cache_bin_preincrement(info, 1, mem, &cur_offset);
|
||||||
cache_bin_init(bin, info, mem, &cur_offset);
|
cache_bin_init(bin, info, mem, &cur_offset);
|
||||||
cache_bin_postincrement(info, 1, mem, &cur_offset);
|
cache_bin_postincrement(mem, &cur_offset);
|
||||||
assert_zu_eq(cur_offset, size, "Should use all requested memory");
|
assert_zu_eq(cur_offset, size, "Should use all requested memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user