/external/jemalloc/test/integration/ |
D | posix_memalign.c | 10 size_t alignment; in TEST_BEGIN() local 13 for (alignment = 0; alignment < sizeof(void *); alignment++) { in TEST_BEGIN() 14 assert_d_eq(posix_memalign(&p, alignment, 1), EINVAL, in TEST_BEGIN() 16 alignment); in TEST_BEGIN() 19 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN() 20 alignment <<= 1) { in TEST_BEGIN() 21 assert_d_ne(posix_memalign(&p, alignment + 1, 1), 0, in TEST_BEGIN() 23 alignment + 1); in TEST_BEGIN() 30 size_t alignment, size; in TEST_BEGIN() local 34 alignment = UINT64_C(0x8000000000000000); in TEST_BEGIN() [all …]
|
D | aligned_alloc.c | 10 size_t alignment; in TEST_BEGIN() local 13 alignment = 0; in TEST_BEGIN() 15 p = aligned_alloc(alignment, 1); in TEST_BEGIN() 17 "Expected error for invalid alignment %zu", alignment); in TEST_BEGIN() 19 for (alignment = sizeof(size_t); alignment < MAXALIGN; in TEST_BEGIN() 20 alignment <<= 1) { in TEST_BEGIN() 22 p = aligned_alloc(alignment + 1, 1); in TEST_BEGIN() 25 alignment + 1); in TEST_BEGIN() 32 size_t alignment, size; in TEST_BEGIN() local 36 alignment = UINT64_C(0x8000000000000000); in TEST_BEGIN() [all …]
|
D | mallocx.c | 72 size_t hugemax, size, alignment; in TEST_BEGIN() local 93 alignment = ZU(0x8000000000000000); in TEST_BEGIN() 96 alignment = ZU(0x80000000); in TEST_BEGIN() 98 assert_ptr_null(mallocx(size, MALLOCX_ALIGN(alignment)), in TEST_BEGIN() 100 alignment); in TEST_BEGIN() 141 size_t nsz, rsz, sz, alignment, total; in TEST_BEGIN() local 148 for (alignment = 8; in TEST_BEGIN() 149 alignment <= MAXALIGN; in TEST_BEGIN() 150 alignment <<= 1) { in TEST_BEGIN() 153 sz < 3 * alignment && sz < (1U << 31); in TEST_BEGIN() [all …]
|
D | sdallocx.c | 15 size_t nsz, sz, alignment, total; in TEST_BEGIN() local 22 for (alignment = 8; in TEST_BEGIN() 23 alignment <= MAXALIGN; in TEST_BEGIN() 24 alignment <<= 1) { in TEST_BEGIN() 27 sz < 3 * alignment && sz < (1U << 31); in TEST_BEGIN() 28 sz += (alignment >> (LG_SIZEOF_PTR-1)) - 1) { in TEST_BEGIN() 30 nsz = nallocx(sz, MALLOCX_ALIGN(alignment) | in TEST_BEGIN() 32 ps[i] = mallocx(sz, MALLOCX_ALIGN(alignment) | in TEST_BEGIN() 41 MALLOCX_ALIGN(alignment)); in TEST_BEGIN()
|
/external/webrtc/webrtc/system_wrappers/source/ |
D | aligned_malloc.cc | 28 uintptr_t GetRightAlign(uintptr_t start_pos, size_t alignment) { in GetRightAlign() argument 31 return (start_pos + alignment - 1) & ~(alignment - 1); in GetRightAlign() 35 bool ValidAlignment(size_t alignment) { in ValidAlignment() argument 36 if (!alignment) { in ValidAlignment() 39 return (alignment & (alignment - 1)) == 0; in ValidAlignment() 42 void* GetRightAlign(const void* pointer, size_t alignment) { in GetRightAlign() argument 46 if (!ValidAlignment(alignment)) { in GetRightAlign() 50 return reinterpret_cast<void*>(GetRightAlign(start_pos, alignment)); in GetRightAlign() 53 void* AlignedMalloc(size_t size, size_t alignment) { in AlignedMalloc() argument 57 if (!ValidAlignment(alignment)) { in AlignedMalloc() [all …]
|
D | aligned_malloc_unittest.cc | 26 bool CorrectUsage(size_t size, size_t alignment) { in CorrectUsage() argument 28 static_cast<char*>(AlignedMalloc(size, alignment))); in CorrectUsage() 33 return 0u == scoped_address % alignment; in CorrectUsage() 38 const size_t alignment = 32; in TEST() local 41 static_cast<char*>(AlignedMalloc(size, alignment))); in TEST() 47 const char* realigned_ptr = GetRightAlign(misaligned_ptr, alignment); in TEST() 53 const size_t alignment = 64; in TEST() local 54 EXPECT_FALSE(CorrectUsage(incorrect_size, alignment)); in TEST() 65 size_t alignment = 2; in TEST() local 66 EXPECT_TRUE(CorrectUsage(size, alignment)); in TEST() [all …]
|
/external/llvm/test/MC/ARM/ |
D | neon-vld-vst-align.s | 13 @ CHECK-ERRORS: error: alignment must be 64 or omitted 16 @ CHECK-ERRORS: error: alignment must be 64 or omitted 20 @ CHECK-ERRORS: error: alignment must be 64 or omitted 23 @ CHECK-ERRORS: error: alignment must be 64 or omitted 35 @ CHECK-ERRORS: error: alignment must be 64 or omitted 38 @ CHECK-ERRORS: error: alignment must be 64 or omitted 42 @ CHECK-ERRORS: error: alignment must be 64 or omitted 45 @ CHECK-ERRORS: error: alignment must be 64 or omitted 57 @ CHECK-ERRORS: error: alignment must be 64 or omitted 60 @ CHECK-ERRORS: error: alignment must be 64 or omitted [all …]
|
/external/dexmaker/src/dx/java/com/android/dx/dex/file/ |
D | Section.java | 36 private final int alignment; field in Section 53 public static void validateAlignment(int alignment) { in validateAlignment() argument 54 if ((alignment <= 0) || in validateAlignment() 55 (alignment & (alignment - 1)) != 0) { in validateAlignment() 69 public Section(String name, DexFile file, int alignment) { in Section() argument 74 validateAlignment(alignment); in Section() 78 this.alignment = alignment; in Section() 98 return alignment; in getAlignment() 133 int mask = alignment - 1; in setFileOffset() 264 out.alignTo(alignment); in align()
|
D | OffsettedItem.java | 28 private final int alignment; field in OffsettedItem 70 public OffsettedItem(int alignment, int writeSize) { in OffsettedItem() argument 71 Section.validateAlignment(alignment); in OffsettedItem() 77 this.alignment = alignment; in OffsettedItem() 165 out.alignTo(alignment); in writeTo() 236 int mask = alignment - 1; in place() 254 return alignment; in getAlignment()
|
/external/libchrome/base/memory/ |
D | aligned_memory.cc | 16 void* AlignedAlloc(size_t size, size_t alignment) { in AlignedAlloc() argument 18 DCHECK_EQ(alignment & (alignment - 1), 0U); in AlignedAlloc() 19 DCHECK_EQ(alignment % sizeof(void*), 0U); in AlignedAlloc() 22 ptr = _aligned_malloc(size, alignment); in AlignedAlloc() 29 ptr = memalign(alignment, size); in AlignedAlloc() 31 if (posix_memalign(&ptr, alignment, size)) in AlignedAlloc() 39 << "size=" << size << ", alignment=" << alignment; in AlignedAlloc() 43 DCHECK_EQ(reinterpret_cast<uintptr_t>(ptr) & (alignment - 1), 0U); in AlignedAlloc()
|
/external/jemalloc/include/jemalloc/internal/ |
D | jemalloc_internal.h | 330 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument 331 ((void *)((uintptr_t)(a) & (-(alignment)))) 334 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument 335 ((size_t)((uintptr_t)(a) & (alignment - 1))) 338 #define ALIGNMENT_CEILING(s, alignment) \ argument 339 (((s) + (alignment - 1)) & (-(alignment))) 544 size_t sa2u(size_t size, size_t alignment); 702 sa2u(size_t size, size_t alignment) in sa2u() argument 706 assert(alignment != 0 && ((alignment - 1) & alignment) == 0); in sa2u() 709 if (size <= SMALL_MAXCLASS && alignment < PAGE) { in sa2u() [all …]
|
D | jemalloc_internal.h.in | 197 * n: alignment 206 /* Use MALLOCX_ALIGN_GET() if alignment may not be specified in flags. */ 223 * Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size 273 # error "Unknown minimum alignment for architecture; specify via " 330 #define ALIGNMENT_ADDR2BASE(a, alignment) \ argument 331 ((void *)((uintptr_t)(a) & (-(alignment)))) 334 #define ALIGNMENT_ADDR2OFFSET(a, alignment) \ argument 335 ((size_t)((uintptr_t)(a) & (alignment - 1))) 337 /* Return the smallest alignment multiple that is >= s. */ 338 #define ALIGNMENT_CEILING(s, alignment) \ argument [all …]
|
/external/skia/include/gpu/ |
D | GrTypes.h | 78 static inline uint32_t GrUIAlignUp(uint32_t x, uint32_t alignment) { in GrUIAlignUp() argument 79 return GrUIDivRoundUp(x, alignment) * alignment; in GrUIAlignUp() 81 static inline size_t GrSizeAlignUp(size_t x, size_t alignment) { in GrSizeAlignUp() argument 82 return GrSizeDivRoundUp(x, alignment) * alignment; in GrSizeAlignUp() 91 static inline uint32_t GrUIAlignUpPad(uint32_t x, uint32_t alignment) { in GrUIAlignUpPad() argument 92 return (alignment - x % alignment) % alignment; in GrUIAlignUpPad() 94 static inline size_t GrSizeAlignUpPad(size_t x, size_t alignment) { in GrSizeAlignUpPad() argument 95 return (alignment - x % alignment) % alignment; in GrSizeAlignUpPad() 101 static inline uint32_t GrUIAlignDown(uint32_t x, uint32_t alignment) { in GrUIAlignDown() argument 102 return (x / alignment) * alignment; in GrUIAlignDown() [all …]
|
/external/llvm/test/MC/MachO/ |
D | x86_32-optimal_nop.s | 4 .align 4, 0 # start with 16 byte alignment filled with zeros 11 .align 4, 0 # start with 16 byte alignment filled with zeros 19 .align 4, 0 # start with 16 byte alignment filled with zeros 26 .align 4, 0 # start with 16 byte alignment filled with zeros 36 .align 4, 0 # start with 16 byte alignment filled with zeros 45 .align 4, 0 # start with 16 byte alignment filled with zeros 53 .align 4, 0 # start with 16 byte alignment filled with zeros 60 .align 4, 0 # start with 16 byte alignment filled with zeros 74 .align 4, 0 # start with 16 byte alignment filled with zeros 87 .align 4, 0 # start with 16 byte alignment filled with zeros [all …]
|
/external/deqp/external/vulkancts/framework/vulkan/ |
D | vkAllocationCallbackUtil.cpp | 37 static VKAPI_ATTR void* VKAPI_CALL systemAllocate (void*, size_t size, size_t alignment, VkSystemAl… in systemAllocate() argument 40 return deAlignedMalloc(size, (deUint32)alignment); in systemAllocate() 50 …KAPI_CALL systemReallocate (void*, void* pOriginal, size_t size, size_t alignment, VkSystemAllocat… in systemReallocate() argument 52 return deAlignedRealloc(pOriginal, size, alignment); in systemReallocate() 80 …id* VKAPI_CALL allocationCallback (void* pUserData, size_t size, size_t alignment, VkSystemAllocat… in allocationCallback() argument 82 …return reinterpret_cast<AllocationCallbacks*>(pUserData)->allocate(size, alignment, allocationScop… in allocationCallback() 85 …locationCallback (void* pUserData, void* pOriginal, size_t size, size_t alignment, VkSystemAllocat… in reallocationCallback() argument 87 …return reinterpret_cast<AllocationCallbacks*>(pUserData)->reallocate(pOriginal, size, alignment, a… in reallocationCallback() 130 AllocationCallbackRecord AllocationCallbackRecord::allocation (size_t size, size_t alignment, VkSys… in allocation() argument 136 record.data.allocation.alignment = alignment; in allocation() [all …]
|
D | vkAllocationCallbackUtil.hpp | 46 …virtual void* allocate (size_t size, size_t alignment, VkSystemAllocationScope allocationSc… 47 …virtual void* reallocate (void* original, size_t size, size_t alignment, VkSystemAllocation… 79 size_t alignment; member 88 size_t alignment; member 109 …static AllocationCallbackRecord allocation (size_t size, size_t alignment, VkSystemAllocationS… 110 …static AllocationCallbackRecord reallocation (void* original, size_t size, size_t alignment, Vk… 122 void* allocate (size_t size, size_t alignment, VkSystemAllocationScope allocationScope); 123 …void* reallocate (void* original, size_t size, size_t alignment, VkSystemAllocationScope … 139 void* allocate (size_t size, size_t alignment, VkSystemAllocationScope allocationScope); 140 …void* reallocate (void* original, size_t size, size_t alignment, VkSystemAllocationScope a… [all …]
|
/external/mesa3d/src/mesa/main/ |
D | imports.c | 85 _mesa_align_malloc(size_t bytes, unsigned long alignment) in _mesa_align_malloc() argument 89 int err = posix_memalign(& mem, alignment, bytes); in _mesa_align_malloc() 94 return _aligned_malloc(bytes, alignment); in _mesa_align_malloc() 98 ASSERT( alignment > 0 ); in _mesa_align_malloc() 100 ptr = (uintptr_t) malloc(bytes + alignment + sizeof(void *)); in _mesa_align_malloc() 104 buf = (ptr + alignment + sizeof(void *)) & ~(uintptr_t)(alignment - 1); in _mesa_align_malloc() 124 _mesa_align_calloc(size_t bytes, unsigned long alignment) in _mesa_align_calloc() argument 129 mem = _mesa_align_malloc(bytes, alignment); in _mesa_align_calloc() 138 mem = _aligned_malloc(bytes, alignment); in _mesa_align_calloc() 147 ASSERT( alignment > 0 ); in _mesa_align_calloc() [all …]
|
/external/llvm/include/llvm/Support/ |
D | Endian.h | 30 template<class T, int alignment> 32 enum {value = alignment == 0 ? AlignOf<T>::Alignment : alignment}; 48 std::size_t alignment> 54 (detail::PickAlignment<value_type, alignment>::value)), in read() 61 template<typename value_type, endianness endian, std::size_t alignment, 64 value_type ret = read<value_type, endian, alignment>(memory); in readNext() 72 std::size_t alignment> 76 (detail::PickAlignment<value_type, alignment>::value)), in write() 86 template <typename value_type, endianness endian, std::size_t alignment> 90 return read<value_type, endian, alignment>(memory); in readAtBitAlignment() [all …]
|
/external/smali/util/src/main/java/org/jf/util/ |
D | AlignmentUtils.java | 32 public static int alignOffset(int offset, int alignment) { in alignOffset() argument 33 int mask = alignment - 1; in alignOffset() 34 assert (alignment >= 0) && ((mask & alignment) == 0); in alignOffset() 38 public static boolean isAligned(int offset, int alignment) { in isAligned() argument 39 return (offset % alignment) == 0; in isAligned()
|
/external/jemalloc/src/ |
D | chunk_mmap.c | 7 chunk_alloc_mmap_slow(size_t size, size_t alignment, bool *zero, bool *commit) in chunk_alloc_mmap_slow() argument 12 alloc_size = size + alignment - PAGE; in chunk_alloc_mmap_slow() 22 leadsize = ALIGNMENT_CEILING((uintptr_t)pages, alignment) - in chunk_alloc_mmap_slow() 35 chunk_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero, in chunk_alloc_mmap() argument 54 assert(alignment != 0); in chunk_alloc_mmap() 55 assert((alignment & chunksize_mask) == 0); in chunk_alloc_mmap() 61 offset = ALIGNMENT_ADDR2OFFSET(ret, alignment); in chunk_alloc_mmap() 64 return (chunk_alloc_mmap_slow(size, alignment, zero, commit)); in chunk_alloc_mmap()
|
D | jemalloc.c | 1529 imemalign_prof_sample(tsd_t *tsd, size_t alignment, size_t usize, argument 1537 assert(sa2u(LARGE_MINCLASS, alignment) == LARGE_MINCLASS); 1538 p = ipalloc(tsd, LARGE_MINCLASS, alignment, false); 1543 p = ipalloc(tsd, usize, alignment, false); 1549 imemalign_prof(tsd_t *tsd, size_t alignment, size_t usize) argument 1556 p = imemalign_prof_sample(tsd, alignment, usize, tctx); 1558 p = ipalloc(tsd, usize, alignment, false); 1570 imemalign(void **memptr, size_t alignment, size_t size, size_t min_alignment) argument 1588 if (unlikely(((alignment - 1) & alignment) != 0 1589 || (alignment < min_alignment))) { [all …]
|
/external/skia/tests/ |
D | MemsetTest.cpp | 122 for (int alignment = 0; alignment < MAX_ALIGNMENT; ++alignment) { in test_16() local 125 uint16_t* base = &buffer[PAD + alignment]; in test_16() 128 compare16(reporter, buffer, 0, PAD + alignment); in test_16() 130 compare16(reporter, base + count, 0, TOTAL - count - PAD - alignment); in test_16() 139 for (int alignment = 0; alignment < MAX_ALIGNMENT; ++alignment) { in test_32() local 142 uint32_t* base = &buffer[PAD + alignment]; in test_32() 145 compare32(reporter, buffer, 0, PAD + alignment); in test_32() 147 compare32(reporter, base + count, 0, TOTAL - count - PAD - alignment); in test_32()
|
/external/lzma/Java/Tukaani/src/org/tukaani/xz/ |
D | BCJOptions.java | 13 private final int alignment; field in BCJOptions 16 BCJOptions(int alignment) { in BCJOptions() argument 17 this.alignment = alignment; in BCJOptions() 27 if ((startOffset & (alignment - 1)) != 0) in setStartOffset() 29 "Start offset must be a multiple of " + alignment); in setStartOffset()
|
/external/webrtc/webrtc/system_wrappers/include/ |
D | aligned_malloc.h | 28 void* GetRightAlign(const void* ptr, size_t alignment); 33 void* AlignedMalloc(size_t size, size_t alignment); 40 T* GetRightAlign(const T* ptr, size_t alignment) { in GetRightAlign() argument 42 alignment)); in GetRightAlign() 45 T* AlignedMalloc(size_t size, size_t alignment) { in AlignedMalloc() argument 46 return reinterpret_cast<T*>(AlignedMalloc(size, alignment)); in AlignedMalloc()
|
/external/llvm/test/CodeGen/X86/ |
D | alignment.ll | 3 ; This cannot get rounded up to the preferred alignment (16) if they have an 4 ; explicit alignment specified. 13 ; Common variables should not get rounded up to the preferred alignment (16) if 14 ; they have an explicit alignment specified. 27 ; This cannot get rounded up to the preferred alignment (16) if they have an 28 ; explicit alignment specified *and* a section specified. 36 ; Common variables should not get rounded up to the preferred alignment (16) if 37 ; they have an explicit alignment specified and a section specified.
|