| 3905 | } |
| 3906 | |
| 3907 | JEMALLOC_NOINLINE void |
| 3908 | sdallocx_default(void *ptr, size_t size, int flags) { |
| 3909 | assert(ptr != NULL); |
| 3910 | assert(malloc_initialized() || IS_INITIALIZER); |
| 3911 | |
| 3912 | tsd_t *tsd = tsd_fetch_min(); |
| 3913 | bool fast = tsd_fast(tsd); |
| 3914 | size_t usize = inallocx(tsd_tsdn(tsd), size, flags); |
| 3915 | check_entry_exit_locking(tsd_tsdn(tsd)); |
| 3916 | |
| 3917 | unsigned tcache_ind = mallocx_tcache_get(flags); |
| 3918 | tcache_t *tcache = tcache_get_from_ind(tsd, tcache_ind, !fast, |
| 3919 | /* is_alloc */ false); |
| 3920 | |
| 3921 | UTRACE(ptr, 0, 0); |
| 3922 | if (likely(fast)) { |
| 3923 | tsd_assert_fast(tsd); |
| 3924 | isfree(tsd, ptr, usize, tcache, false); |
| 3925 | } else { |
| 3926 | uintptr_t args_raw[3] = {(uintptr_t)ptr, size, flags}; |
| 3927 | hook_invoke_dalloc(hook_dalloc_sdallocx, ptr, args_raw); |
| 3928 | isfree(tsd, ptr, usize, tcache, true); |
| 3929 | } |
| 3930 | check_entry_exit_locking(tsd_tsdn(tsd)); |
| 3931 | } |
| 3932 | |
| 3933 | JEMALLOC_EXPORT void JEMALLOC_NOTHROW |
| 3934 | je_sdallocx(void *ptr, size_t size, int flags) { |
no test coverage detected