Lines Matching refs:alignment
90 void* debug_aligned_alloc(size_t alignment, size_t size);
91 void* debug_memalign(size_t alignment, size_t bytes);
97 int debug_posix_memalign(void** memptr, size_t alignment, size_t size);
565 void* debug_memalign(size_t alignment, size_t bytes) { in debug_memalign() argument
567 return g_dispatch->memalign(alignment, bytes); in debug_memalign()
585 if (!powerof2(alignment)) { in debug_memalign()
586 alignment = BIONIC_ROUND_UP_POWER_OF_2(alignment); in debug_memalign()
590 if (alignment < MINIMUM_ALIGNMENT_BYTES) { in debug_memalign()
591 alignment = MINIMUM_ALIGNMENT_BYTES; in debug_memalign()
597 size_t real_size = alignment + bytes + g_debug->extra_bytes(); in debug_memalign()
611 value += (-value % alignment); in debug_memalign()
622 pointer = g_dispatch->memalign(alignment, real_size); in debug_memalign()
638 g_debug->record->AddEntry(new MemalignEntry(pointer, bytes, alignment)); in debug_memalign()
864 void* debug_aligned_alloc(size_t alignment, size_t size) { in debug_aligned_alloc() argument
866 return g_dispatch->aligned_alloc(alignment, size); in debug_aligned_alloc()
868 if (!powerof2(alignment) || (size % alignment) != 0) { in debug_aligned_alloc()
872 return debug_memalign(alignment, size); in debug_aligned_alloc()
875 int debug_posix_memalign(void** memptr, size_t alignment, size_t size) { in debug_posix_memalign() argument
877 return g_dispatch->posix_memalign(memptr, alignment, size); in debug_posix_memalign()
880 if (alignment < sizeof(void*) || !powerof2(alignment)) { in debug_posix_memalign()
884 *memptr = debug_memalign(alignment, size); in debug_posix_memalign()