mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 00:23:33 +03:00
Optimize ixalloc by avoiding a size lookup.
This commit is contained in:
parent
c834912aa9
commit
0ff7ff3ec7
4 changed files with 27 additions and 15 deletions
|
|
@ -2834,14 +2834,14 @@ label_oom:
|
|||
JEMALLOC_ALWAYS_INLINE size_t
|
||||
ixallocx_helper(tsdn_t *tsdn, void *ptr, size_t old_usize, size_t size,
|
||||
size_t extra, size_t alignment, bool zero) {
|
||||
size_t usize;
|
||||
size_t newsize;
|
||||
|
||||
if (ixalloc(tsdn, ptr, old_usize, size, extra, alignment, zero)) {
|
||||
if (ixalloc(tsdn, ptr, old_usize, size, extra, alignment, zero,
|
||||
&newsize)) {
|
||||
return old_usize;
|
||||
}
|
||||
usize = isalloc(tsdn, ptr);
|
||||
|
||||
return usize;
|
||||
return newsize;
|
||||
}
|
||||
|
||||
static size_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue