Home
last modified time | relevance | path

Searched refs:alignment (Results 1 – 20 of 20) sorted by relevance

/bionic/tests/libs/
Dbionic_tests_zipalign.cpp68 static bool CreateAlignedZip(ZipArchiveHandle& handle, FILE* zip_dst, uint32_t alignment) { in CreateAlignedZip() argument
88 error = writer.StartAlignedEntry(zip_name.c_str(), flags, alignment); in CreateAlignedZip()
128 unsigned long int alignment = strtoul(argv[1], &end, 10); in main() local
129 if ((alignment == ULONG_MAX && errno == ERANGE) || *end != '\0') { in main()
134 if (((alignment - 1) & alignment) != 0) { in main()
154 bool success = CreateAlignedZip(handle, zip_dst, static_cast<uint32_t>(alignment)); in main()
/bionic/libc/private/
Dbionic_macros.h43 #define BIONIC_ALIGN(value, alignment) \ argument
44 (((value) + (alignment) - 1) & ~((alignment) - 1))
/bionic/libc/malloc_debug/
Dmalloc_debug.cpp76 void* debug_memalign(size_t alignment, size_t bytes);
81 int debug_posix_memalign(void** memptr, size_t alignment, size_t size);
412 void* debug_memalign(size_t alignment, size_t bytes) { in debug_memalign() argument
414 return g_dispatch->memalign(alignment, bytes); in debug_memalign()
430 if (!powerof2(alignment)) { in debug_memalign()
431 alignment = BIONIC_ROUND_UP_POWER_OF_2(alignment); in debug_memalign()
435 if (alignment < MINIMUM_ALIGNMENT_BYTES) { in debug_memalign()
436 alignment = MINIMUM_ALIGNMENT_BYTES; in debug_memalign()
442 size_t real_size = alignment + bytes + g_debug->extra_bytes(); in debug_memalign()
456 value += (-value % alignment); in debug_memalign()
[all …]
DRecordData.cpp90 MemalignEntry::MemalignEntry(void* pointer, size_t size, size_t alignment) in MemalignEntry() argument
91 : MallocEntry(pointer, size), alignment_(alignment) { in MemalignEntry()
DRecordData.h135 MemalignEntry(void* pointer, size_t size, size_t alignment);
DREADME.md292 pointer = memalign(alignment, size)
294 **THREAD\_ID**: memalign pointer alignment size
296 posix\_memalign(&pointer, alignment, size)
298 **THREAD\_ID**: memalign pointer alignment size
/bionic/tests/
Dmalloc_test.cpp79 for (size_t alignment = 1 << i; alignment < (1U << (i+1)); alignment++) { in TEST() local
80 char *ptr = reinterpret_cast<char*>(memalign(alignment, 100)); in TEST()
81 ASSERT_TRUE(ptr != NULL) << "Failed at alignment " << alignment; in TEST()
82 ASSERT_LE(100U, malloc_usable_size(ptr)) << "Failed at alignment " << alignment; in TEST()
84 << "Failed at alignment " << alignment; in TEST()
115 for (size_t alignment = 1; alignment <= 4096; alignment <<= 1) { in TEST() local
116 char *ptr = (char*)memalign(alignment, 100); in TEST()
119 ASSERT_EQ(0U, (intptr_t)ptr % alignment); in TEST()
Dbuffer_tests.cpp195 static void *GetAlignedPtr(void *orig_ptr, int alignment, int or_mask) { in GetAlignedPtr() argument
197 if (alignment > 0) { in GetAlignedPtr()
201 ptr += alignment - (ptr & (alignment - 1)); in GetAlignedPtr()
202 ptr |= alignment | or_mask; in GetAlignedPtr()
Dpthread_test.cpp1782 void* allocate(size_t size, size_t alignment) { in allocate() argument
1783 char* p = new char[size + alignment * 2]; in allocate()
1785 while (!is_strict_aligned(p, alignment)) { in allocate()
1798 bool is_strict_aligned(char* p, size_t alignment) { in is_strict_aligned() argument
1799 return (reinterpret_cast<uintptr_t>(p) % (alignment * 2)) == alignment; in is_strict_aligned()
/bionic/libc/bionic/
Dmalloc_common.cpp129 extern "C" void* memalign(size_t alignment, size_t bytes) { in memalign() argument
132 return _memalign(alignment, bytes); in memalign()
134 return Malloc(memalign)(alignment, bytes); in memalign()
137 extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size) { in posix_memalign() argument
140 return _posix_memalign(memptr, alignment, size); in posix_memalign()
142 return Malloc(posix_memalign)(memptr, alignment, size); in posix_memalign()
/bionic/libc/include/
Dmalloc.h42 void* memalign(size_t alignment, size_t byte_count) __mallocfunc __BIONIC_ALLOC_SIZE(2) __wur;
Dstdlib.h75 int posix_memalign(void** memptr, size_t alignment, size_t size) __INTRODUCED_IN(16);
/bionic/libc/kernel/uapi/mtd/
Dubi-user.h71 __s32 alignment; member
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_unit_tests.cpp324 for (size_t alignment = 1; alignment <= 256; alignment++) { in TEST_F() local
325 pointer = reinterpret_cast<uint8_t*>(debug_memalign(alignment, 100)); in TEST_F()
328 size_t alignment_mask = alignment - 1; in TEST_F()
329 if (!powerof2(alignment)) { in TEST_F()
330 alignment_mask = BIONIC_ROUND_UP_POWER_OF_2(alignment) - 1; in TEST_F()
416 for (size_t alignment = 1; alignment <= 256; alignment++) { in TEST_F() local
417 pointer = reinterpret_cast<uint8_t*>(debug_memalign(alignment, 100)); in TEST_F()
421 size_t alignment_mask = alignment - 1; in TEST_F()
422 if (!powerof2(alignment)) { in TEST_F()
423 alignment_mask = BIONIC_ROUND_UP_POWER_OF_2(alignment) - 1; in TEST_F()
[all …]
/bionic/libc/kernel/uapi/drm/
Di915_drm.h374 int alignment; member
490 __u64 alignment; member
511 __u64 alignment; member
582 __u64 alignment; member
Dradeon_drm.h695 int alignment; member
762 __u64 alignment; member
Damdgpu_drm.h75 __u64 alignment; member
/bionic/linker/
Dlinker_phdr.h68 bool CheckFileRange(ElfW(Addr) offset, size_t size, size_t alignment);
Dlinker_phdr.cpp277 bool ElfReader::CheckFileRange(ElfW(Addr) offset, size_t size, size_t alignment) { in CheckFileRange() argument
290 ((offset % alignment) == 0); in CheckFileRange()
/bionic/
Dandroid-changes-for-ndk-developers.md112 Current versions of the zipalign tool take care of alignment.