/bionic/libc/private/ |
D | bionic_macros.h | 36 #define BIONIC_ALIGN(value, alignment) \ argument 37 (((value) + (alignment) - 1) & ~((alignment) - 1))
|
/bionic/libc/bionic/ |
D | malloc_debug_leak.cpp | 244 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 …]
|
D | malloc_debug_qemu.cpp | 640 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 …]
|
D | malloc_debug_check.cpp | 359 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 …]
|
D | malloc_debug_common.cpp | 266 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/ |
D | malloc_test.cpp | 77 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()
|
D | buffer_tests.cpp | 195 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/ |
D | malloc.h | 35 extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_…
|
D | stdlib.h | 70 extern int posix_memalign(void **memptr, size_t alignment, size_t size);
|
/bionic/libc/kernel/uapi/linux/ |
D | som.h | 164 unsigned int alignment :27; member
|
/bionic/libc/kernel/uapi/mtd/ |
D | ubi-user.h | 69 __s32 alignment; member
|
/bionic/libc/kernel/uapi/drm/ |
D | i915_drm.h | 340 int alignment; member 454 __u64 alignment; member 475 __u64 alignment; member 531 __u64 alignment; member
|
D | radeon_drm.h | 689 int alignment; member 751 uint64_t alignment; member
|
/bionic/libc/upstream-dlmalloc/ |
D | malloc.c | 1357 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 …]
|
D | malloc.h | 598 void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
|
/bionic/libc/arch-mips64/string/ |
D | mips_strlen.c | 80 #error strlen: mips64 check for 4-byte alignment not implemented. in strlen()
|
/bionic/libc/arch-mips/string/ |
D | mips_strlen.c | 79 #error strlen: mips64 check for 4-byte alignment not implemented. in strlen()
|