/system/core/libutils/tests/ |
H A D | Unicode_test.cpp | 132 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/core/libcutils/tests/ |
H A D | MemsetTest.cpp | 90 // 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/extras/simpleperf/ |
H A D | utils.h | 30 static inline uint64_t Align(uint64_t value, uint64_t alignment) { argument 31 return (value + alignment - 1) & ~(alignment - 1);
|
/system/libhwbinder/ |
H A D | Debug.cpp | 161 size_t alignment, bool cStyle, 164 if (alignment == 0) { 165 if (bytesPerLine >= 16) alignment = 4; 166 else if (bytesPerLine >= 8) alignment = 2; 167 else alignment = 1; 225 size_t align_offset = alignment-(alignment?1:0); 231 for (index = 0; index < alignment || (alignment == 0 && index < bytesPerLine); index++) { 234 if (index == 0 && word > 0 && alignment > 159 printHexData(int32_t indent, const void *buf, size_t length, size_t bytesPerLine, int32_t singleLineBytesCutoff, size_t alignment, bool cStyle, debugPrintFunc func, void* cookie) argument [all...] |
/system/libhwbinder/include/hwbinder/ |
H A D | TextOutput.h | 103 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/libziparchive/ |
H A D | zip_writer.cc | 66 // 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/micro_bench/ |
H A D | micro_bench.cpp | 47 // 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/core/toolbox/ |
H A D | newfs_msdos.c | 264 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)
|
/system/media/camera/src/ |
H A D | camera_metadata.c | 35 #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 D | flatbuffers.h | 764 /// @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...] |