Lines Matching refs:alignment

1825 	 * Whether or not allocations (with alignment) of size 0 should be
1844 * The minimum valid alignment for functions requesting aligned storage.
1850 /* The error string to use if the passed-in alignment is invalid. */
1896 size_t alignment;
1908 dynamic_opts->alignment = 0;
1914 /* ind is ignored if dopts->alignment > 0. */
1948 if (unlikely(dopts->alignment != 0)) {
1949 return ipalloct(tsd_tsdn(tsd), usize, dopts->alignment,
1970 assert(((dopts->alignment == 0) ?
1972 sz_sa2u(SC_LARGE_MINCLASS, dopts->alignment))
2058 if (unlikely(dopts->alignment < sopts->min_alignment
2059 || (dopts->alignment & (dopts->alignment - 1)) != 0)) {
2065 if (dopts->alignment == 0) {
2082 usize = sz_sa2u(size, dopts->alignment);
2132 * imalloc_sample ignores ind if dopts->alignment > 0.
2148 * If dopts->alignment > 0, then ind is still 0, but usize was
2150 * alignment path, imalloc_no_sample ignores ind and size
2164 assert(dopts->alignment == 0
2165 || ((uintptr_t)allocation & (dopts->alignment - 1)) == ZU(0));
2397 je_posix_memalign(void **memptr, size_t alignment, size_t size) {
2402 LOG("core.posix_memalign.entry", "mem ptr: %p, alignment: %zu, "
2403 "size: %zu", memptr, alignment, size);
2413 "<jemalloc>: Error allocating aligned memory: invalid alignment\n";
2418 dopts.alignment = alignment;
2422 uintptr_t args[3] = {(uintptr_t)memptr, (uintptr_t)alignment,
2437 je_aligned_alloc(size_t alignment, size_t size) {
2443 LOG("core.aligned_alloc.entry", "alignment: %zu, size: %zu\n",
2444 alignment, size);
2456 "<jemalloc>: Error allocating aligned memory: invalid alignment\n";
2461 dopts.alignment = alignment;
2465 uintptr_t args[3] = {(uintptr_t)alignment, (uintptr_t)size};
2801 * If !config_cache_oblivious, we can check PAGE alignment to
2870 je_memalign(size_t alignment, size_t size) {
2875 LOG("core.memalign.entry", "alignment: %zu, size: %zu\n", alignment,
2885 "<jemalloc>: Error allocating aligned memory: invalid alignment\n";
2891 dopts.alignment = alignment;
2895 uintptr_t args[3] = {alignment, size};
2925 "<jemalloc>: Error allocating aligned memory: invalid alignment\n";
2930 dopts.alignment = PAGE;
2957 JEMALLOC_EXPORT void *(*__memalign_hook)(size_t alignment, size_t size) =
3049 dopts.alignment = MALLOCX_ALIGN_GET_SPECIFIED(flags);
3102 dopts.alignment = MALLOCX_ALIGN_GET_SPECIFIED(flags);
3135 size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena,
3144 SC_LARGE_MINCLASS, alignment, zero, tcache,
3151 p = iralloct(tsdn, old_ptr, old_usize, usize, alignment, zero,
3160 size_t alignment, size_t *usize, bool zero, tcache_t *tcache,
3171 *usize, alignment, zero, tcache, arena, tctx, hook_args);
3173 p = iralloct(tsd_tsdn(tsd), old_ptr, old_usize, size, alignment,
3181 if (p == old_ptr && alignment != 0) {
3185 * alignment, and that the alignment constraint was
3206 size_t alignment = MALLOCX_ALIGN_GET(flags);
3252 usize = (alignment == 0) ?
3253 sz_s2u(size) : sz_sa2u(size, alignment);
3258 p = irallocx_prof(tsd, ptr, old_usize, size, alignment, &usize,
3264 p = iralloct(tsd_tsdn(tsd), ptr, old_usize, size, alignment,
3273 assert(alignment == 0 || ((uintptr_t)p & (alignment - 1)) == ZU(0));
3298 size_t extra, size_t alignment, bool zero) {
3301 if (ixalloc(tsdn, ptr, old_usize, size, extra, alignment, zero,
3311 size_t extra, size_t alignment, bool zero, prof_tctx_t *tctx) {
3317 usize = ixallocx_helper(tsdn, ptr, old_usize, size, extra, alignment,
3325 size_t extra, size_t alignment, bool zero, alloc_ctx_t *alloc_ctx) {
3338 if (alignment == 0) {
3343 usize_max = sz_sa2u(size+extra, alignment);
3359 size, extra, alignment, zero, tctx);
3362 extra, alignment, zero);
3378 size_t alignment = MALLOCX_ALIGN_GET(flags);
3417 alignment, zero, &alloc_ctx);
3420 extra, alignment, zero);