| /src/lib/libc/stdlib/ |
| H A D | aligned_alloc.c | 42 aligned_alloc(size_t alignment, size_t size) argument 48 * Check that alignment is a power of 2. 50 if (alignment == 0 || ((alignment - 1) & alignment) != 0) { 56 * Adjust alignment to satisfy posix_memalign, 59 while (alignment < sizeof(void *)) { 60 alignment <<= 1; 63 err = posix_memalign(&memptr, alignment, size);
|
| /src/sys/external/bsd/compiler_rt/dist/lib/sanitizer_common/ |
| H A D | sanitizer_allocator_checks.h | 41 // Checks aligned_alloc() parameters, verifies that the alignment is a power of 42 // two and that the size is a multiple of alignment for POSIX implementation, 44 // of alignment. 45 INLINE bool CheckAlignedAllocAlignmentAndSize(uptr alignment, uptr size) { argument 47 return alignment != 0 && IsPowerOfTwo(alignment) && 48 (size & (alignment - 1)) == 0; 50 return alignment != 0 && size % alignment == 0; 54 // Checks posix_memalign() parameters, verifies that alignment i 56 CheckPosixMemalignAlignment(uptr alignment) argument [all...] |
| H A D | sanitizer_allocator_report.h | 26 void NORETURN ReportInvalidAllocationAlignment(uptr alignment, 28 void NORETURN ReportInvalidAlignedAllocAlignment(uptr size, uptr alignment, 30 void NORETURN ReportInvalidPosixMemalignAlignment(uptr alignment,
|
| H A D | sanitizer_allocator_report.cc | 65 void NORETURN ReportInvalidAllocationAlignment(uptr alignment, argument 68 ScopedAllocatorErrorReport report("invalid-allocation-alignment", stack); 69 Report("ERROR: %s: invalid allocation alignment: %zd, alignment must be a " 70 "power of two\n", SanitizerToolName, alignment); 75 void NORETURN ReportInvalidAlignedAllocAlignment(uptr size, uptr alignment, argument 78 ScopedAllocatorErrorReport report("invalid-aligned-alloc-alignment", stack); 80 Report("ERROR: %s: invalid alignment requested in " 81 "aligned_alloc: %zd, alignment must be a power of two and the " 82 "requested size 0x%zx must be a multiple of alignment\ 93 ReportInvalidPosixMemalignAlignment(uptr alignment,const StackTrace * stack) argument [all...] |
| H A D | sanitizer_allocator.cc | 33 extern "C" void *__libc_memalign(uptr alignment, uptr size); 41 static void *__libc_memalign(uptr alignment, uptr size) { argument 43 uptr error = posix_memalign(&p, alignment, size); 53 uptr alignment) { 56 if (alignment == 0) 59 return __libc_memalign(alignment, size); 66 DCHECK_EQ(alignment, 0); 110 uptr alignment) { 111 if (alignment == 0) alignment 52 RawInternalAlloc(uptr size,InternalAllocatorCache * cache,uptr alignment) argument 109 RawInternalAlloc(uptr size,InternalAllocatorCache * cache,uptr alignment) argument 122 uptr alignment = 8; local in function:__sanitizer::RawInternalRealloc 150 InternalAlloc(uptr size,InternalAllocatorCache * cache,uptr alignment) argument 220 SetLowLevelAllocateMinAlignment(uptr alignment) argument [all...] |
| H A D | sanitizer_allocator_combined.h | 48 void *Allocate(AllocatorCache *cache, uptr size, uptr alignment) { argument 52 if (size + alignment < size) { 54 "0x%zx bytes with 0x%zx alignment requested\n", 55 SanitizerToolName, size, alignment); 59 // If alignment requirements are to be fulfilled by the frontend allocator 60 // rather than by the primary or secondary, passing an alignment lower than 62 // alignment check. 63 if (alignment > 8) 64 size = RoundUpTo(size, alignment); 69 // alignment withou 101 Reallocate(AllocatorCache * cache,void * p,uptr new_size,uptr alignment) argument [all...] |
| /src/sys/external/bsd/compiler_rt/dist/include/sanitizer/ |
| H A D | hwasan_interface.h | 65 int __sanitizer_posix_memalign(void **memptr, size_t alignment, size_t size); 66 void * __sanitizer_memalign(size_t alignment, size_t size); 67 void * __sanitizer_aligned_alloc(size_t alignment, size_t size); 68 void * __sanitizer___libc_memalign(size_t alignment, size_t size);
|
| /src/sys/external/bsd/drm/dist/bsd-core/ |
| H A D | drm_mm.h | 62 unsigned alignment, 66 unsigned alignment) 68 return drm_mm_get_block_generic(parent, size, alignment, 0); 72 unsigned alignment) 74 return drm_mm_get_block_generic(parent, size, alignment, 1); 79 unsigned alignment, 64 drm_mm_get_block(struct drm_mm_node * parent,unsigned long size,unsigned alignment) argument 70 drm_mm_get_block_atomic(struct drm_mm_node * parent,unsigned long size,unsigned alignment) argument
|
| H A D | drm_sman.h | 60 /* Allocate a memory block with given size and alignment. 64 unsigned alignment); 144 unsigned alignment,
|
| /src/lib/librumpuser/ |
| H A D | rumpuser_mem.c | 47 rumpuser_malloc(size_t howmuch, int alignment, void **memp) argument 52 if (alignment == 0) 53 alignment = sizeof(void *); 55 rv = posix_memalign(&mem, (size_t)alignment, howmuch); 58 printf("rumpuser_malloc: invalid alignment %d\n", 59 alignment); 87 "alignment not supported by hypervisor\n");
|
| /src/sys/external/bsd/compiler_rt/dist/lib/tsan/rtl/ |
| H A D | tsan_malloc_mac.cc | 28 #define COMMON_MALLOC_MEMALIGN(alignment, size) \ 30 user_memalign(cur_thread(), StackTrace::GetCurrentPc(), alignment, size) 43 #define COMMON_MALLOC_POSIX_MEMALIGN(memptr, alignment, size) \ 45 void *p = InternalAlloc(size, nullptr, alignment); \ 50 SCOPED_INTERCEPTOR_RAW(posix_memalign, memptr, alignment, size); \ 51 int res = user_posix_memalign(thr, pc, memptr, alignment, size);
|
| /src/sys/external/bsd/drm2/dist/drm/i915/gem/ |
| H A D | i915_gem_stolen.h | 19 unsigned alignment); 22 unsigned alignment, u64 start,
|
| /src/sbin/gpt/ |
| H A D | map.c | 203 map_alloc(gpt_t gpt, off_t start, off_t size, off_t alignment) argument 208 if (alignment > 0) { 209 if ((start % alignment) != 0) 210 start = (start + alignment) / alignment * alignment; 211 if ((size % alignment) != 0) 212 size = (size + alignment) / alignment * alignment; 249 map_resize(gpt_t gpt,map_t m,off_t size,off_t alignment) argument [all...] |
| H A D | resize.c | 59 "[-i index | -b blocknr] [-a alignment] [-s size] [-q]", 72 resize(gpt_t gpt, u_int entry, off_t alignment, off_t sectors, argument 92 alignsecs = alignment / gpt->secsz; 105 if (alignment == 0 || 106 (alignment > 0 && sectors % alignsecs == 0)) { 149 off_t alignment = 0, sectors, start = 0, size = 0; local in function:cmd_resize 159 else if (gpt_add_ais(gpt, &alignment, &entry, &size, ch) == -1) 178 if ((sectors = gpt_check_ais(gpt, alignment, entry, size)) == -1) 181 return resize(gpt, entry, alignment, sectors, size, quiet);
|
| /src/sys/external/gpl2/dts/dist/arch/arm/boot/dts/ |
| H A D | exynos-mfc-reserved-memory.dtsi | 18 alignment = <0x100000>; 25 alignment = <0x100000>;
|
| /src/sys/external/bsd/compiler_rt/dist/lib/asan/ |
| H A D | asan_malloc_local.h | 28 void* MemalignFromLocalPool(uptr alignment, uptr size);
|
| H A D | asan_malloc_mac.cc | 29 #define COMMON_MALLOC_MEMALIGN(alignment, size) \ 31 void *p = asan_memalign(alignment, size, &stack, FROM_MALLOC) 41 #define COMMON_MALLOC_POSIX_MEMALIGN(memptr, alignment, size) \ 43 int res = asan_posix_memalign(memptr, alignment, size, &stack);
|
| H A D | asan_malloc_linux.cc | 65 static int PosixMemalignFromLocalPool(void **memptr, uptr alignment, argument 67 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) 70 CHECK(alignment >= kWordSize); 73 uptr aligned_addr = RoundUpTo(addr, alignment); 87 void* MemalignFromLocalPool(uptr alignment, uptr size) { argument 89 alignment = Max(alignment, kWordSize); 90 PosixMemalignFromLocalPool(&ptr, alignment, size); 216 INTERCEPTOR(int, posix_memalign, void **memptr, uptr alignment, uptr size) { argument 218 return PosixMemalignFromLocalPool(memptr, alignment, siz [all...] |
| H A D | asan_premap_shadow.cc | 37 uptr alignment = granularity * 8; local in function:__asan::PremapShadow 40 uptr map_size = shadow_size + left_padding + alignment; 45 uptr shadow_start = RoundUpTo(map_start + left_padding, alignment);
|
| /src/sys/external/bsd/compiler_rt/dist/lib/lsan/ |
| H A D | lsan_malloc_mac.cc | 28 #define COMMON_MALLOC_MEMALIGN(alignment, size) \ 30 void *p = lsan_memalign(alignment, size, stack) 40 #define COMMON_MALLOC_POSIX_MEMALIGN(memptr, alignment, size) \ 42 int res = lsan_posix_memalign(memptr, alignment, size, stack)
|
| H A D | lsan_allocator.cc | 79 void *Allocate(const StackTrace &stack, uptr size, uptr alignment, argument 85 void *p = allocator.Allocate(GetAllocatorCache(), size, alignment); 119 uptr alignment) { 125 p = allocator.Reallocate(GetAllocatorCache(), p, new_size, alignment); 141 int lsan_posix_memalign(void **memptr, uptr alignment, uptr size, argument 143 if (UNLIKELY(!CheckPosixMemalignAlignment(alignment))) { 146 ReportInvalidPosixMemalignAlignment(alignment, &stack); 148 void *ptr = Allocate(stack, size, alignment, kAlwaysClearMemory); 152 CHECK(IsAligned((uptr)ptr, alignment)); 157 void *lsan_aligned_alloc(uptr alignment, upt argument 118 Reallocate(const StackTrace & stack,void * p,uptr new_size,uptr alignment) argument 167 lsan_memalign(uptr alignment,uptr size,const StackTrace & stack) argument [all...] |
| /src/sys/external/bsd/drm2/dist/drm/i915/ |
| H A D | i915_gem_gtt.c | 190 * @alignment: required alignment of starting offset, may be 0 but 201 * is can insert the node. The hole address is aligned to @alignment and 220 u64 size, u64 alignment, unsigned long color, 231 GEM_BUG_ON(alignment && !is_power_of_2(alignment)); 232 GEM_BUG_ON(alignment && !IS_ALIGNED(alignment, I915_GTT_MIN_ALIGNMENT)); 242 if (unlikely(round_up(start, alignment) > round_down(end - size, alignment))) 218 i915_gem_gtt_insert(struct i915_address_space * vm,struct drm_mm_node * node,u64 size,u64 alignment,unsigned long color,u64 start,u64 end,unsigned int flags) argument [all...] |
| /src/sys/arch/i386/stand/ |
| H A D | Makefile.inc | 15 OPT_SIZE.clang= ${OPT_SIZE.gcc} -mstack-alignment=4 -DNDEBUG
|
| /src/sys/external/bsd/drm2/dist/drm/qxl/ |
| H A D | qxl_gem.c | 51 int alignment, int initial_domain, 61 if (alignment < PAGE_SIZE) 62 alignment = PAGE_SIZE; 68 size, initial_domain, alignment, r); 50 qxl_gem_object_create(struct qxl_device * qdev,int size,int alignment,int initial_domain,bool discardable,bool kernel,struct qxl_surface * surf,struct drm_gem_object ** obj) argument
|
| /src/lib/libbsdmalloc/ |
| H A D | malloc.c | 75 * byte is the size index. The remaining bytes are for alignment. 506 * already aligned by malloc on multiples of n. Larger alignment is 527 aligned_alloc(size_t alignment, size_t size) argument 531 if (alignment == 0 || 532 (alignment & (alignment - 1)) != 0 || 533 alignment > cachedpagesize()) { 537 p = malloc(size < alignment ? alignment : size); 539 ASSERT((uintptr_t)p % alignment 561 posix_memalign(void ** memptr,size_t alignment,size_t size) argument [all...] |