Searched refs:alignment (Results 1 - 18 of 18) sorted by relevance

/bionic/libc/private/
H A Dbionic_macros.h36 #define BIONIC_ALIGN(value, alignment) \
37 (((value) + (alignment) - 1) & ~((alignment) - 1))
/bionic/libc/bionic/
H A Dmalloc_debug_leak.cpp244 extern "C" void* fill_memalign(size_t alignment, size_t bytes) { argument
245 void* buffer = g_malloc_dispatch->memalign(alignment, bytes);
262 extern "C" int fill_posix_memalign(void** memptr, size_t alignment, size_t size) { argument
263 if (!powerof2(alignment)) {
267 *memptr = fill_memalign(alignment, size);
450 extern "C" void* leak_memalign(size_t alignment, size_t bytes) { argument
452 return g_malloc_dispatch->memalign(alignment, bytes);
456 if (alignment <= MALLOC_ALIGNMENT) {
461 if (!powerof2(alignment)) {
462 alignment
499 leak_posix_memalign(void** memptr, size_t alignment, size_t size) argument
[all...]
H A Dmalloc_debug_qemu.cpp351 /* Memory allocation alignment that is used in the malloc implementation.
634 * alignment - Alignment requirement set for memiry allocations.
640 extern "C" int memcheck_initialize(int alignment, const char* memcheck_param) { argument
641 malloc_alignment = alignment;
794 /* If default alignment is bigger than element size, we will
795 * set our prefix size to the default alignment size. */
964 extern "C" void* qemu_instrumented_memalign(size_t alignment, size_t bytes) {
970 malloc_pid, getpid(), alignment, bytes);
974 // Prefix size for aligned allocation must be equal to the alignment used
975 // for allocation in order to ensure proper alignment o
[all...]
H A Dmalloc_debug_check.cpp359 extern "C" void* chk_memalign(size_t alignment, size_t bytes) { argument
361 return g_malloc_dispatch->memalign(alignment, bytes);
364 if (alignment <= MALLOC_ALIGNMENT) {
368 // Make the alignment a power of two.
369 if (!powerof2(alignment)) {
370 alignment = BIONIC_ROUND_UP_POWER_OF_2(alignment);
373 // here, alignment is at least MALLOC_ALIGNMENT<<1 bytes
375 // and at most alignment-MALLOC_ALIGNMENT bytes
376 size_t size = (alignment
566 chk_posix_memalign(void** memptr, size_t alignment, size_t size) argument
[all...]
H A Dmalloc_debug_common.cpp266 extern "C" void* memalign(size_t alignment, size_t bytes) { argument
267 return __libc_malloc_dispatch->memalign(alignment, bytes);
270 extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size) { argument
271 return __libc_malloc_dispatch->posix_memalign(memptr, alignment, size);
/bionic/tests/
H A Dmalloc_test.cpp75 // Memalign test where the alignment is any value.
77 for (size_t alignment = 1 << i; alignment < (1U << (i+1)); alignment++) {
78 char *ptr = reinterpret_cast<char*>(memalign(alignment, 100));
79 ASSERT_TRUE(ptr != NULL) << "Failed at alignment " << alignment;
80 ASSERT_LE(100U, malloc_usable_size(ptr)) << "Failed at alignment " << alignment;
82 << "Failed at alignment " << alignmen
[all...]
H A Dbuffer_tests.cpp31 // Both buffers at same alignment.
63 // Set of multiple buffer alignment combinations to be used for string/memory
66 // Both buffers at same alignment.
194 // Return a pointer into the current buffer with the specified alignment.
195 static void *GetAlignedPtr(void *orig_ptr, int alignment, int or_mask) { argument
197 if (alignment > 0) {
198 // When setting the alignment, set it to exactly the alignment chosen.
201 ptr += alignment - (ptr & (alignment
[all...]
/bionic/libc/include/
H A Dmalloc.h35 extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(2)));
H A Dstdlib.h70 extern int posix_memalign(void **memptr, size_t alignment, size_t size);
/bionic/libc/kernel/uapi/linux/
H A Dsom.h164 unsigned int alignment :27; member in struct:subspace_dictionary_record
/bionic/libc/kernel/uapi/mtd/
H A Dubi-user.h69 __s32 alignment; member in struct:ubi_mkvol_req
/bionic/libc/upstream-dlmalloc/
H A Dmalloc.c249 Controls the minimum alignment for malloc'ed chunks. It must be a
253 the case of 8-byte alignment.
573 /* OSX allocators provide 16 byte alignment */
912 memalign(size_t alignment, size_t n);
914 in accord with the alignment argument.
916 The alignment argument should be a power of two. If the argument is
918 8-byte alignment is guaranteed by normal malloc calls, so don't
926 int posix_memalign(void** pp, size_t alignment, size_t n);
927 Allocates a chunk of n bytes, aligned in accord with the alignment
930 returns EINVAL if the alignment i
4912 internal_memalign(mstate m, size_t alignment, size_t bytes) argument
5283 dlmemalign(size_t alignment, size_t bytes) argument
5290 dlposix_memalign(void** pp, size_t alignment, size_t bytes) argument
5843 mspace_memalign(mspace msp, size_t alignment, size_t bytes) argument
[all...]
H A Dmalloc.h172 memalign(size_t alignment, size_t n);
174 in accord with the alignment argument.
176 The alignment argument should be a power of two. If the argument is
178 8-byte alignment is guaranteed by normal malloc calls, so don't
186 int posix_memalign(void** pp, size_t alignment, size_t n);
187 Allocates a chunk of n bytes, aligned in accord with the alignment
190 returns EINVAL if the alignment is not a power of two (3) fails and
490 because of alignment and bookkeeping overhead. Because it includes
491 alignment wastage as being in use, this figure may be greater than
512 often not) due to alignment an
[all...]
/bionic/libc/arch-mips/string/
H A Dmips_strlen.c79 #error strlen: mips64 check for 4-byte alignment not implemented.
/bionic/libc/arch-mips64/string/
H A Dmips_strlen.c80 #error strlen: mips64 check for 4-byte alignment not implemented.
/bionic/libc/kernel/uapi/drm/
H A Di915_drm.h340 int alignment; member in struct:drm_i915_mem_alloc
454 __u64 alignment; member in struct:drm_i915_gem_exec_object
475 __u64 alignment; member in struct:drm_i915_gem_exec_object2
531 __u64 alignment; member in struct:drm_i915_gem_pin
H A Dradeon_drm.h689 int alignment; member in struct:drm_radeon_mem_alloc
751 uint64_t alignment; member in struct:drm_radeon_gem_create
/bionic/libc/
H A DAndroid.mk528 # To customize dlmalloc's alignment, set BOARD_MALLOC_ALIGNMENT in

Completed in 305 milliseconds