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

/system/core/libutils/tests/
H A DUnicode_test.cpp132 const size_t alignment = sysconf(_SC_PAGESIZE); local
133 const size_t size = 2 * alignment;
134 ASSERT_EQ(posix_memalign(&memptr, alignment, size), 0);
138 char16_t* const emptyString = (char16_t* const)((char*)memptr + alignment - 4);
141 ASSERT_EQ(mprotect((char*)memptr + alignment, alignment, PROT_NONE), 0);
146 ASSERT_EQ(mprotect((char*)memptr + alignment, alignment, PROT_READ | PROT_WRITE), 0);
/system/libhwbinder/include/hwbinder/
H A DDebug.h39 size_t alignment=0, bool cArrayStyle=false,
H A DTextOutput.h103 inline HexDump& setAlignment(size_t alignment);
110 inline size_t alignment() const;
188 inline HexDump& HexDump::setAlignment(size_t alignment) { argument
189 mAlignment = alignment; return *this;
199 inline size_t HexDump::alignment() const { return mAlignment; } function in class:android::hardware::HexDump
/system/core/libcutils/tests/
H A DMemsetTest.cpp90 // Return a pointer into the current buffer with the specified alignment.
91 static void *GetAlignedPtr(void *orig_ptr, int alignment, int or_mask) { argument
93 if (alignment > 0) {
94 // When setting the alignment, set it to exactly the alignment chosen.
97 ptr += alignment - (ptr & (alignment - 1));
98 ptr |= alignment | or_mask;
/system/core/libziparchive/include/ziparchive/
H A Dzip_writer.h109 * entry will be aligned to the given alignment.
115 int32_t StartAlignedEntry(const char* path, size_t flags, uint32_t alignment);
125 int32_t StartAlignedEntryWithTime(const char* path, size_t flags, time_t time, uint32_t alignment);
/system/core/libziparchive/
H A Dzip_writer.cc66 // The alignment parameter is not a power of 2.
132 uint32_t alignment = 0; local
135 alignment = 4;
137 return StartAlignedEntryWithTime(path, flags, time_t(), alignment);
140 int32_t ZipWriter::StartAlignedEntry(const char* path, size_t flags, uint32_t alignment) { argument
141 return StartAlignedEntryWithTime(path, flags, time_t(), alignment);
145 uint32_t alignment = 0; local
148 alignment = 4;
150 return StartAlignedEntryWithTime(path, flags, time, alignment);
199 uint32_t alignment) {
198 StartAlignedEntryWithTime(const char* path, size_t flags, time_t time, uint32_t alignment) argument
[all...]
/system/extras/simpleperf/
H A Dutils.h30 static inline uint64_t Align(uint64_t value, uint64_t alignment) { argument
31 return (value + alignment - 1) & ~(alignment - 1);
H A Dread_elf_test.cpp39 // Read build id from data starting from different alignment addresses.
47 for (size_t alignment = 0; alignment <= 3; ++alignment) {
48 char* start = data.data() + alignment;
/system/extras/micro_bench/
H A Dmicro_bench.cpp47 // Default memory alignment of malloc.
101 // Allocate memory with a specific alignment and return that pointer.
102 // This function assumes an alignment value that is a power of 2.
103 // If the alignment is 0, then use the pointer returned by malloc.
104 uint8_t *getAlignedMemory(uint8_t *orig_ptr, int alignment, int or_mask) { argument
107 if (alignment > 0) {
108 // When setting the alignment, set it to exactly the alignment chosen.
111 ptr += alignment - (ptr & (alignment
121 allocateAlignedMemory(size_t size, int alignment, int or_mask) argument
165 getAlignmentIncrement(size_t size, int alignment) argument
173 getColdBuffer(int num_buffers, size_t incr, int alignment, int or_mask) argument
[all...]
/system/libhwbinder/
H A DTextOutput.cpp68 val.singleLineCutoff(), val.alignment(), val.carrayStyle(),
/system/core/libcutils/
H A Dfs_config.cpp55 #define ALIGN(x, alignment) (((x) + ((alignment)-1)) & ~((alignment)-1))
/system/chre/host/msm/daemon/generated/
H A Dchre_slpi_skel.c155 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, __FILE_LINE__, size, alignment, (void**)&pv))
157 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, 0, size, alignment, (void**)&pv))
288 int32_t nativeSize; /*in the simple case its the same as wire size and alignment*/\
336 //at the alignment requrements for the descriptor
H A Dchre_slpi_stub.c155 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, __FILE_LINE__, size, alignment, (void**)&pv))
157 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, 0, size, alignment, (void**)&pv))
288 int32_t nativeSize; /*in the simple case its the same as wire size and alignment*/\
336 //at the alignment requrements for the descriptor
/system/media/camera/src/
H A Dcamera_metadata.c35 #define ALIGN_TO(val, alignment) \
36 (((uintptr_t)(val) + ((alignment) - 1)) & ~((alignment) - 1))
111 * non-pointer type description in order to figure out the largest alignment
168 * The preferred alignment of a packet of camera metadata. In general,
412 size_t alignment; member in struct:__anon2061
416 .alignment = METADATA_ALIGNMENT
420 .alignment = ENTRY_ALIGNMENT
424 .alignment = DATA_ALIGNMENT
430 alignments[i].alignment);
[all...]
/system/chre/external/flatbuffers/include/flatbuffers/
H A Dflatbuffers.h764 /// @brief get the minimum alignment this buffer needs to be accessed
969 uoffset_t StartStruct(size_t alignment) {
970 Align(alignment);
979 // after it with "alignment" without padding.
980 void PreAlign(size_t len, size_t alignment) {
981 buf_.fill(PaddingBytes(GetSize() + len, alignment));
1092 // alignment to be something different than what the element size would
1096 void ForceVectorAlignment(size_t len, size_t elemsize, size_t alignment) { argument
1097 PreAlign(len * elemsize, alignment);
1796 // Sadly, the exact alignment i
[all...]
/system/core/toolbox/
H A Dnewfs_msdos.c264 u_int extra_res, alignment=0, set_res, set_spf, set_spc, tempx, attempts=0; local
559 * turn change the alignment. This should take at most 2 iterations, as
562 * be half of its previous size, and thus will not throw off alignment.
600 alignment = (bpb.res + bpb.bspf * bpb.nft) % bpb.spc;
601 extra_res += bpb.spc - alignment;
604 } while(opt_A && alignment != 0 && attempts < 2);
605 if (alignment != 0)

Completed in 422 milliseconds