mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Fix a conversion warning.
This commit is contained in:
parent
8b34a788b5
commit
01d61a3c6f
1 changed files with 4 additions and 2 deletions
|
|
@ -371,13 +371,15 @@ cache_bin_alloc(cache_bin_t *bin, bool *success) {
|
|||
|
||||
JEMALLOC_ALWAYS_INLINE cache_bin_sz_t
|
||||
cache_bin_alloc_batch(cache_bin_t *bin, size_t num, void **out) {
|
||||
size_t n = cache_bin_ncached_get_internal(bin, /* racy */ false);
|
||||
cache_bin_sz_t n = cache_bin_ncached_get_internal(bin,
|
||||
/* racy */ false);
|
||||
if (n > num) {
|
||||
n = num;
|
||||
n = (cache_bin_sz_t)num;
|
||||
}
|
||||
memcpy(out, bin->stack_head, n * sizeof(void *));
|
||||
bin->stack_head += n;
|
||||
cache_bin_low_water_adjust(bin);
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue