Searched defs:alignment (Results 1 - 25 of 422) sorted by relevance

1234567891011>>

/external/clang/test/CodeGen/
H A D2005-07-26-UnionInitCrash.c3 union { char bytes[8]; double alignment; }EQ1 = {0,0,0,0,0,0,0,0}; member in union:__anon2394
/external/libchrome/base/memory/
H A Daligned_memory.cc16 void* AlignedAlloc(size_t size, size_t alignment) { argument
18 DCHECK_EQ(alignment & (alignment - 1), 0U);
19 DCHECK_EQ(alignment % sizeof(void*), 0U);
22 ptr = _aligned_malloc(size, alignment);
29 ptr = memalign(alignment, size);
31 if (posix_memalign(&ptr, alignment, size))
39 << "size=" << size << ", alignment=" << alignment; local
42 // Sanity check alignment jus
[all...]
/external/webrtc/webrtc/system_wrappers/source/
H A Daligned_array_unittest.cc19 bool IsAligned(const void* ptr, size_t alignment) { argument
20 return reinterpret_cast<uintptr_t>(ptr) % alignment == 0;
/external/compiler-rt/test/scudo/
H A Dmemalign.cpp6 // tests for the condition where the alignment is not a power of 2.
14 extern "C" void *aligned_alloc (size_t alignment, size_t size);
19 size_t alignment = 1U << 12; local
20 size_t size = alignment;
24 p = memalign(alignment, size);
29 posix_memalign(&p, alignment, size);
33 p = aligned_alloc(alignment, size);
39 p = memalign(alignment - 1, size);
45 // CHECK: ERROR: malloc alignment is not a power of 2
/external/compiler-rt/lib/scudo/
H A Dscudo_interceptors.cpp47 INTERCEPTOR(void*, memalign, uptr alignment, uptr size) { argument
48 return scudoMemalign(alignment, size);
51 INTERCEPTOR(void*, __libc_memalign, uptr alignment, uptr size) { argument
52 return scudoMemalign(alignment, size);
59 INTERCEPTOR(void*, aligned_alloc, uptr alignment, uptr size) { argument
60 return scudoAlignedAlloc(alignment, size);
63 INTERCEPTOR(int, posix_memalign, void **memptr, uptr alignment, uptr size) { argument
64 return scudoPosixMemalign(memptr, alignment, size);
/external/fio/lib/
H A Dmemalign.c14 void *fio_memalign(size_t alignment, size_t size) argument
19 assert(!(alignment & (alignment - 1)));
21 ptr = malloc(size + alignment + size + sizeof(*f) - 1);
23 ret = PTR_ALIGN(ptr, alignment - 1);
/external/libdrm/tests/radeon/
H A Drbo.h38 unsigned alignment; member in struct:rbo
43 unsigned alignment, void *ptr);
/external/mesa3d/src/gallium/auxiliary/os/
H A Dos_memory_stdc.h54 os_malloc_aligned(size_t size, size_t alignment) argument
57 alignment = (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
58 if(posix_memalign(&ptr, alignment, size) != 0)
H A Dos_memory_aligned.h30 * Memory alignment wrappers.
56 * Return memory on given byte alignment
59 os_malloc_aligned(size_t size, size_t alignment) argument
67 * alloc_size = size + alignment + sizeof(void *)
71 if (add_overflow_size_t(size, alignment, &alloc_size) ||
80 buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment - 1) & ~((uintptr_t)(alignment - 1)));
/external/smali/util/src/main/java/org/jf/util/
H A DAlignmentUtils.java32 public static int alignOffset(int offset, int alignment) { argument
33 int mask = alignment - 1;
34 assert (alignment >= 0) && ((mask & alignment) == 0);
38 public static boolean isAligned(int offset, int alignment) { argument
39 return (offset % alignment) == 0;
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
H A Dexternal_constant_pool.cc30 int64 alignment) {
32 CHECK(alignment > 0 && IsPowerOfTwo(static_cast<uint64>(alignment)));
37 literal_size, std::max<size_t>(alignment, sizeof(void*)));
39 << " bytes with alignment of " << alignment; local
29 Insert(string name, const Literal& literal, int64 alignment) argument
/external/tensorflow/tensorflow/core/common_runtime/gpu/
H A Dgpu_managed_allocator.cc24 void* GpuManagedAllocator::AllocateRaw(size_t alignment, size_t num_bytes) { argument
29 CHECK(!(reinterpret_cast<uintptr_t>(ptr) & (alignment - 1)));
/external/webrtc/webrtc/system_wrappers/include/
H A Daligned_malloc.h18 // Note: alignment must be a power of two. The alignment is in bytes.
24 // Returns a pointer to the first boundry of |alignment| bytes following the
28 void* GetRightAlign(const void* ptr, size_t alignment);
30 // Allocates memory of |size| bytes aligned on an |alignment| boundry.
33 void* AlignedMalloc(size_t size, size_t alignment);
40 T* GetRightAlign(const T* ptr, size_t alignment) { argument
42 alignment));
45 T* AlignedMalloc(size_t size, size_t alignment) { argument
46 return reinterpret_cast<T*>(AlignedMalloc(size, alignment));
[all...]
/external/boringssl/include/openssl/
H A Dthread.h89 double alignment; member in union:crypto_mutex_st
99 // do that. Instead we statically assert that the size and native alignment of
/external/boringssl/src/include/openssl/
H A Dthread.h89 double alignment; member in union:crypto_mutex_st
99 // do that. Instead we statically assert that the size and native alignment of
/external/deqp/framework/delibs/decpp/
H A DdeArrayBuffer.cpp35 void* ArrayBuffer_AlignedMalloc (size_t numBytes, size_t alignment) argument
45 ptr = deAlignedMalloc(sizeAsInt, (int)alignment);
/external/gemmlowp/internal/
H A Dplatform.h56 inline void *aligned_alloc(size_t alignment, size_t size) { argument
57 return _aligned_malloc(size, alignment);
79 inline void *aligned_alloc(size_t alignment, size_t size) {
81 return memalign(alignment, size);
84 if (posix_memalign(&memptr, alignment, size)) {
/external/jemalloc/src/
H A Dchunk_mmap.c7 chunk_alloc_mmap_slow(size_t size, size_t alignment, bool *zero, bool *commit) argument
12 alloc_size = size + alignment - PAGE;
22 leadsize = ALIGNMENT_CEILING((uintptr_t)pages, alignment) -
33 chunk_alloc_mmap(void *new_addr, size_t size, size_t alignment, bool *zero, argument
40 * Ideally, there would be a way to specify alignment to mmap() (like
52 assert(alignment != 0);
53 assert((alignment & chunksize_mask) == 0);
59 offset = ALIGNMENT_ADDR2OFFSET(ret, alignment);
62 return (chunk_alloc_mmap_slow(size, alignment, zero, commit));
/external/jemalloc/test/integration/
H A Daligned_alloc.c21 size_t alignment; local
24 alignment = 0;
26 p = aligned_alloc(alignment, 1);
28 "Expected error for invalid alignment %zu", alignment);
30 for (alignment = sizeof(size_t); alignment < MAXALIGN;
31 alignment <<= 1) {
33 p = aligned_alloc(alignment + 1, 1);
35 "Expected error for invalid alignment
43 size_t alignment, size; local
89 size_t alignment, size, total; local
[all...]
H A Dposix_memalign.c21 size_t alignment; local
24 for (alignment = 0; alignment < sizeof(void *); alignment++) {
25 assert_d_eq(posix_memalign(&p, alignment, 1), EINVAL,
26 "Expected error for invalid alignment %zu",
27 alignment); local
30 for (alignment = sizeof(size_t); alignment < MAXALIGN;
31 alignment <<
34 alignment + 1); local
41 size_t alignment, size; local
53 alignment, size); local
64 alignment, size); local
74 alignment, size); local
81 size_t alignment, size, total; local
[all...]
H A Dsdallocx.c15 size_t nsz, sz, alignment, total; local
22 for (alignment = 8;
23 alignment <= MAXALIGN;
24 alignment <<= 1) {
27 sz < 3 * alignment && sz < (1U << 31);
28 sz += (alignment >> (LG_SIZEOF_PTR-1)) - 1) {
30 nsz = nallocx(sz, MALLOCX_ALIGN(alignment) |
32 ps[i] = mallocx(sz, MALLOCX_ALIGN(alignment) |
41 MALLOCX_ALIGN(alignment));
/external/libchrome/base/allocator/
H A Dallocator_shim_default_dispatch_to_glibc.cc17 void* __libc_memalign(size_t alignment, size_t size);
44 size_t alignment,
47 return __libc_memalign(alignment, size);
43 GlibcMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) argument
/external/lzma/Java/Tukaani/src/org/tukaani/xz/
H A DBCJOptions.java13 private final int alignment; field in class:BCJOptions
16 BCJOptions(int alignment) { argument
17 this.alignment = alignment;
27 if ((startOffset & (alignment - 1)) != 0)
29 "Start offset must be a multiple of " + alignment);
/external/mesa3d/src/gallium/drivers/ilo/core/
H A Dilo_vma.h52 uint32_t size, uint32_t alignment)
55 assert(size && alignment);
57 vma->vm_alignment = alignment;
51 ilo_vma_init(struct ilo_vma *vma, const struct ilo_dev *dev, uint32_t size, uint32_t alignment) argument
/external/mesa3d/src/mesa/drivers/dri/i965/
H A Dintel_upload.c85 uint32_t alignment,
91 offset = ALIGN_NPOT(brw->upload.next_offset, alignment);
127 uint32_t alignment,
131 void *dst = intel_upload_space(brw, size, alignment, out_bo, out_offset);
83 intel_upload_space(struct brw_context *brw, uint32_t size, uint32_t alignment, drm_intel_bo **out_bo, uint32_t *out_offset) argument
124 intel_upload_data(struct brw_context *brw, const void *data, uint32_t size, uint32_t alignment, drm_intel_bo **out_bo, uint32_t *out_offset) argument

Completed in 627 milliseconds

1234567891011>>