| 3433 | } |
| 3434 | |
| 3435 | static void * |
| 3436 | irallocx_prof_sample(tsdn_t *tsdn, void *old_ptr, size_t old_usize, |
| 3437 | size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena, |
| 3438 | prof_tctx_t *tctx, hook_ralloc_args_t *hook_args) { |
| 3439 | void *p; |
| 3440 | |
| 3441 | if (tctx == NULL) { |
| 3442 | return NULL; |
| 3443 | } |
| 3444 | |
| 3445 | alignment = prof_sample_align(alignment); |
| 3446 | if (usize <= SC_SMALL_MAXCLASS) { |
| 3447 | p = iralloct(tsdn, old_ptr, old_usize, |
| 3448 | SC_LARGE_MINCLASS, alignment, zero, tcache, |
| 3449 | arena, hook_args); |
| 3450 | if (p == NULL) { |
| 3451 | return NULL; |
| 3452 | } |
| 3453 | arena_prof_promote(tsdn, p, usize); |
| 3454 | } else { |
| 3455 | p = iralloct(tsdn, old_ptr, old_usize, usize, alignment, zero, |
| 3456 | tcache, arena, hook_args); |
| 3457 | } |
| 3458 | assert(prof_sample_aligned(p)); |
| 3459 | |
| 3460 | return p; |
| 3461 | } |
| 3462 | |
| 3463 | JEMALLOC_ALWAYS_INLINE void * |
| 3464 | irallocx_prof(tsd_t *tsd, void *old_ptr, size_t old_usize, size_t size, |
no test coverage detected