Home
last modified time | relevance | path

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

/bionic/libc/private/
Dbionic_macros.h36 #define BIONIC_ALIGN(value, alignment) \ argument
37 (((value) + (alignment) - 1) & ~((alignment) - 1))
/bionic/libc/bionic/
Dmalloc_debug_leak.cpp244 extern "C" void* fill_memalign(size_t alignment, size_t bytes) { in fill_memalign() argument
245 void* buffer = g_malloc_dispatch->memalign(alignment, bytes); in fill_memalign()
262 extern "C" int fill_posix_memalign(void** memptr, size_t alignment, size_t size) { in fill_posix_memalign() argument
263 if (!powerof2(alignment)) { in fill_posix_memalign()
267 *memptr = fill_memalign(alignment, size); in fill_posix_memalign()
450 extern "C" void* leak_memalign(size_t alignment, size_t bytes) { in leak_memalign() argument
452 return g_malloc_dispatch->memalign(alignment, bytes); in leak_memalign()
456 if (alignment <= MALLOC_ALIGNMENT) { in leak_memalign()
461 if (!powerof2(alignment)) { in leak_memalign()
462 alignment = BIONIC_ROUND_UP_POWER_OF_2(alignment); in leak_memalign()
[all …]
Dmalloc_debug_qemu.cpp640 extern "C" int memcheck_initialize(int alignment, const char* memcheck_param) { in memcheck_initialize() argument
641 malloc_alignment = alignment; in memcheck_initialize()
964 extern "C" void* qemu_instrumented_memalign(size_t alignment, size_t bytes) { in qemu_instrumented_memalign() argument
970 malloc_pid, getpid(), alignment, bytes); in qemu_instrumented_memalign()
978 if (alignment < DEFAULT_PREFIX_SIZE) { in qemu_instrumented_memalign()
979 alignment = DEFAULT_PREFIX_SIZE; in qemu_instrumented_memalign()
980 } else if (!powerof2(alignment)) { in qemu_instrumented_memalign()
981 alignment = BIONIC_ROUND_UP_POWER_OF_2(alignment); in qemu_instrumented_memalign()
983 desc.prefix_size = alignment; in qemu_instrumented_memalign()
989 malloc_pid, getpid(), alignment, bytes, size); in qemu_instrumented_memalign()
[all …]
Dmalloc_debug_check.cpp359 extern "C" void* chk_memalign(size_t alignment, size_t bytes) { in chk_memalign() argument
361 return g_malloc_dispatch->memalign(alignment, bytes); in chk_memalign()
364 if (alignment <= MALLOC_ALIGNMENT) { in chk_memalign()
369 if (!powerof2(alignment)) { in chk_memalign()
370 alignment = BIONIC_ROUND_UP_POWER_OF_2(alignment); in chk_memalign()
376 size_t size = (alignment-MALLOC_ALIGNMENT) + bytes; in chk_memalign()
386 if ((ptr % alignment) != 0) { in chk_memalign()
388 ptr += ((-ptr) % alignment); in chk_memalign()
566 extern "C" int chk_posix_memalign(void** memptr, size_t alignment, size_t size) { in chk_posix_memalign() argument
568 return g_malloc_dispatch->posix_memalign(memptr, alignment, size); in chk_posix_memalign()
[all …]
Dmalloc_debug_common.cpp266 extern "C" void* memalign(size_t alignment, size_t bytes) { in memalign() argument
267 return __libc_malloc_dispatch->memalign(alignment, bytes); in memalign()
270 extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size) { in posix_memalign() argument
271 return __libc_malloc_dispatch->posix_memalign(memptr, alignment, size); in posix_memalign()
/bionic/tests/
Dmalloc_test.cpp77 for (size_t alignment = 1 << i; alignment < (1U << (i+1)); alignment++) { in TEST() local
78 char *ptr = reinterpret_cast<char*>(memalign(alignment, 100)); in TEST()
79 ASSERT_TRUE(ptr != NULL) << "Failed at alignment " << alignment; in TEST()
80 ASSERT_LE(100U, malloc_usable_size(ptr)) << "Failed at alignment " << alignment; in TEST()
82 << "Failed at alignment " << alignment; in TEST()
113 for (size_t alignment = 1; alignment <= 4096; alignment <<= 1) { in TEST() local
114 char *ptr = (char*)memalign(alignment, 100); in TEST()
117 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()
/bionic/libc/include/
Dmalloc.h35 extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_…
Dstdlib.h70 extern int posix_memalign(void **memptr, size_t alignment, size_t size);
/bionic/libc/kernel/uapi/linux/
Dsom.h164 unsigned int alignment :27; member
/bionic/libc/kernel/uapi/mtd/
Dubi-user.h69 __s32 alignment; member
/bionic/libc/kernel/uapi/drm/
Di915_drm.h340 int alignment; member
454 __u64 alignment; member
475 __u64 alignment; member
531 __u64 alignment; member
Dradeon_drm.h689 int alignment; member
751 uint64_t alignment; member
/bionic/libc/upstream-dlmalloc/
Dmalloc.c1357 DLMALLOC_EXPORT void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
4914 static void* internal_memalign(mstate m, size_t alignment, size_t bytes) { in internal_memalign() argument
4916 if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */ in internal_memalign()
4917 alignment = MIN_CHUNK_SIZE; in internal_memalign()
4918 if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */ in internal_memalign()
4920 while (a < alignment) a <<= 1; in internal_memalign()
4921 alignment = a; in internal_memalign()
4923 if (bytes >= MAX_REQUEST - alignment) { in internal_memalign()
4930 size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD; in internal_memalign()
4936 if ((((size_t)(mem)) & (alignment - 1)) != 0) { /* misaligned */ in internal_memalign()
[all …]
Dmalloc.h598 void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
/bionic/libc/arch-mips64/string/
Dmips_strlen.c80 #error strlen: mips64 check for 4-byte alignment not implemented. in strlen()
/bionic/libc/arch-mips/string/
Dmips_strlen.c79 #error strlen: mips64 check for 4-byte alignment not implemented. in strlen()