/external/smali/util/src/main/java/org/jf/util/ |
H A D | AlignmentUtils.java | 32 public static int alignOffset(int offset, int alignment) { argument 33 int mask = alignment - 1; 34 assert (alignment >= 0) && ((mask & alignment) == 0); 38 public static boolean isAligned(int offset, int alignment) { argument 39 return (offset % alignment) == 0;
|
/external/clang/test/CodeGen/ |
H A D | 2005-07-26-UnionInitCrash.c | 3 union { char bytes[8]; double alignment; }EQ1 = {0,0,0,0,0,0,0,0}; member in union:__anon18536
|
/external/valgrind/main/none/tests/ |
H A D | pth_stackalign.stdout.exp | 0 alignment = 0
|
/external/jemalloc/test/integration/ |
H A D | posix_memalign.c | 10 size_t alignment; local 13 for (alignment = 0; alignment < sizeof(void *); alignment++) { 14 assert_d_eq(posix_memalign(&p, alignment, 1), EINVAL, 15 "Expected error for invalid alignment %zu", 16 alignment); local 19 for (alignment = sizeof(size_t); alignment < MAXALIGN; 20 alignment << 23 alignment + 1); local 30 size_t alignment, size; local 42 alignment, size); local 53 alignment, size); local 63 alignment, size); local 69 size_t alignment, size, total; local [all...] |
H A D | aligned_alloc.c | 10 size_t alignment; local 13 alignment = 0; 15 p = aligned_alloc(alignment, 1); 17 "Expected error for invalid alignment %zu", alignment); 19 for (alignment = sizeof(size_t); alignment < MAXALIGN; 20 alignment <<= 1) { 22 p = aligned_alloc(alignment + 1, 1); 24 "Expected error for invalid alignment 32 size_t alignment, size; local 77 size_t alignment, size, total; local [all...] |
H A D | mallocx.c | 38 size_t nsz, rsz, sz, alignment, total; local 45 for (alignment = 8; 46 alignment <= MAXALIGN; 47 alignment <<= 1) { 50 sz < 3 * alignment && sz < (1U << 31); 51 sz += (alignment >> (LG_SIZEOF_PTR-1)) - 1) { 53 nsz = nallocx(sz, MALLOCX_ALIGN(alignment) | 56 "nallocx() error for alignment=%zu, " 57 "size=%zu (%#zx)", alignment, sz, sz); 58 ps[i] = mallocx(sz, MALLOCX_ALIGN(alignment) | [all...] |
/external/chromium_org/chrome/browser/themes/ |
H A D | theme_properties_unittest.cc | 16 int alignment = ThemeProperties::StringToAlignment(top_left); local 18 alignment); 19 EXPECT_EQ(top_left, ThemeProperties::AlignmentToString(alignment)); 22 alignment = ThemeProperties::StringToAlignment("top"); 23 EXPECT_EQ(ThemeProperties::ALIGN_TOP, alignment); 24 EXPECT_EQ("center top", ThemeProperties::AlignmentToString(alignment)); 26 alignment = ThemeProperties::StringToAlignment("left"); 27 EXPECT_EQ(ThemeProperties::ALIGN_LEFT, alignment); 28 EXPECT_EQ("left center", ThemeProperties::AlignmentToString(alignment)); 30 alignment 41 int alignment = ThemeProperties::StringToAlignment("bottom right"); local [all...] |
/external/chromium_org/base/memory/ |
H A D | aligned_memory.cc | 15 void* AlignedAlloc(size_t size, size_t alignment) { argument 17 DCHECK_EQ(alignment & (alignment - 1), 0U); 18 DCHECK_EQ(alignment % sizeof(void*), 0U); 21 ptr = _aligned_malloc(size, alignment); 28 ptr = memalign(alignment, size); 30 if (posix_memalign(&ptr, alignment, size)) 38 << "size=" << size << ", alignment=" << alignment; local 41 // Sanity check alignment jus [all...] |
/external/chromium_org/third_party/webrtc/system_wrappers/source/ |
H A D | aligned_malloc.cc | 24 // Reference on memory alignment: 25 // http://stackoverflow.com/questions/227897/solve-the-memory-alignment-in-c-interview-question-that-stumped-me 28 uintptr_t GetRightAlign(uintptr_t start_pos, size_t alignment) { argument 29 // The pointer should be aligned with |alignment| bytes. The - 1 guarantees 31 return (start_pos + alignment - 1) & ~(alignment - 1); 35 bool ValidAlignment(size_t alignment) { argument 36 if (!alignment) { 39 return (alignment & (alignment 42 GetRightAlign(const void* pointer, size_t alignment) argument 53 AlignedMalloc(size_t size, size_t alignment) argument [all...] |
H A D | aligned_malloc_unittest.cc | 25 // Returns true if |size| and |alignment| are valid combinations. 26 bool CorrectUsage(size_t size, size_t alignment) { argument 28 static_cast<char*>(AlignedMalloc(size, alignment))); 33 return 0u == scoped_address % alignment; 38 const size_t alignment = 32; local 41 static_cast<char*>(AlignedMalloc(size, alignment))); 47 const char* realigned_ptr = GetRightAlign(misaligned_ptr, alignment); 53 const size_t alignment = 64; local 54 EXPECT_FALSE(CorrectUsage(incorrect_size, alignment)); 65 size_t alignment local 71 size_t alignment = 32; local 77 size_t alignment = 128; local [all...] |
/external/chromium_org/third_party/webrtc/system_wrappers/interface/ |
H A D | aligned_malloc.h | 18 // Note: alignment must be a power of two. The alignment is in bytes. 24 // Returns a pointer to the first boundry of |alignment| bytes following the 28 void* GetRightAlign(const void* ptr, size_t alignment); 30 // Allocates memory of |size| bytes aligned on an |alignment| boundry. 33 void* AlignedMalloc(size_t size, size_t alignment); 40 T* GetRightAlign(const T* ptr, size_t alignment) { argument 42 alignment)); 45 T* AlignedMalloc(size_t size, size_t alignment) { argument 46 return reinterpret_cast<T*>(AlignedMalloc(size, alignment)); [all...] |
/external/chromium_org/third_party/yasm/source/patched-yasm/libyasm/tests/ |
H A D | opt-oldalign.asm | 2 times ($$-$) & 1Fh nop ; Long word alignment
|
/external/chromium_org/third_party/mesa/src/src/gallium/auxiliary/os/ |
H A D | os_memory_aligned.h | 30 * Memory alignment wrappers. 43 * Return memory on given byte alignment 46 os_malloc_aligned(size_t size, size_t alignment) argument 50 ptr = (char *) os_malloc(size + alignment + sizeof(void *)); 54 buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment - 1) & ~((uintptr_t)(alignment - 1)));
|
/external/chromium_org/third_party/openmax_dl/dl/sp/src/test/ |
H A D | aligned_ptr.c | 15 /* |alignment| is the byte alignment and MUST be a power of two. */ 16 struct AlignedPtr* AllocAlignedPointer(int alignment, int bytes) { argument 21 aligned_ptr->raw_pointer_ = malloc(bytes + alignment); 23 raw_address = (raw_address + alignment - 1) & ~(alignment - 1);
|
H A D | aligned_ptr.h | 25 * pointer is aligned to |alignment| bytes, which MUST be a power of 29 struct AlignedPtr* AllocAlignedPointer(int alignment, int bytes);
|
/external/mesa3d/src/gallium/auxiliary/os/ |
H A D | os_memory_aligned.h | 30 * Memory alignment wrappers. 43 * Return memory on given byte alignment 46 os_malloc_aligned(size_t size, size_t alignment) argument 50 ptr = (char *) os_malloc(size + alignment + sizeof(void *)); 54 buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment - 1) & ~((uintptr_t)(alignment - 1)));
|
/external/dexmaker/src/dx/java/com/android/dx/dex/file/ |
H A D | Section.java | 34 /** {@code > 0;} alignment requirement for the final output; 36 private final int alignment; field in class:Section 47 * Validates an alignment. 49 * @param alignment the alignment 50 * @throws IllegalArgumentException thrown if {@code alignment} 53 public static void validateAlignment(int alignment) { argument 54 if ((alignment <= 0) || 55 (alignment & (alignment 69 Section(String name, DexFile file, int alignment) argument [all...] |
/external/compiler-rt/test/sanitizer_common/TestCases/Linux/ |
H A D | aligned_alloc.c | 3 extern void *aligned_alloc (size_t alignment, size_t size);
|
/external/fio/ |
H A D | memalign.h | 4 extern void *fio_memalign(size_t alignment, size_t size);
|
H A D | memalign.c | 14 void *fio_memalign(size_t alignment, size_t size) argument 19 assert(!(alignment & (alignment - 1))); 21 ptr = malloc(size + alignment + size + sizeof(*f) - 1); 23 ret = PTR_ALIGN(ptr, alignment);
|
/external/webrtc/src/system_wrappers/interface/ |
H A D | aligned_malloc.h | 20 size_t alignment);
|
/external/chromium_org/third_party/tcmalloc/vendor/src/ |
H A D | system-alloc.cc | 108 // Structure for discovering alignment 146 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 154 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 162 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 182 void* Alloc(size_t size, size_t *actual_size, size_t alignment); 196 size_t alignment) { 213 if (static_cast<ptrdiff_t>(size + alignment) < 0) return NULL; 216 // tested for overflow at the alignment boundary. 217 size = ((size + alignment - 1) / alignment) * alignmen 195 Alloc(size_t size, size_t *actual_size, size_t alignment) argument 267 Alloc(size_t size, size_t *actual_size, size_t alignment) argument 336 Alloc(size_t size, size_t *actual_size, size_t alignment) argument 426 Alloc(size_t size, size_t *actual_size, size_t alignment) argument 468 TCMalloc_SystemAlloc(size_t size, size_t *actual_size, size_t alignment) argument [all...] |
/external/chromium_org/ash/system/tray/ |
H A D | tray_utils.h | 25 void SetTrayImageItemBorder(views::View* tray_view, ShelfAlignment alignment); 29 ShelfAlignment alignment);
|
/external/chromium_org/mojo/system/ |
H A D | memory.cc | 16 template <size_t alignment> 18 return reinterpret_cast<uintptr_t>(pointer) % alignment == 0; 30 template <size_t size, size_t alignment> 32 CHECK(pointer && IsAligned<alignment>(pointer)); 41 template <size_t size, size_t alignment> 45 CHECK(count == 0 || (pointer && IsAligned<alignment>(pointer))); 58 template <size_t alignment> 63 CHECK(size == 0 || (!!pointer && internal::IsAligned<alignment>(pointer))); 73 // alignment has been explicitly been specified (using |MOJO_ALIGNAS()|), which
|
/external/compiler-rt/test/asan/TestCases/Windows/ |
H A D | aligned_mallocs.cc | 6 #define CHECK_ALIGNED(ptr,alignment) \ 8 if (((uintptr_t)(ptr) % (alignment)) != 0) \
|