Home
last modified time | relevance | path

Searched refs:alignment (Results 1 – 25 of 39) sorted by relevance

12

/system/core/libutils/
DUnicode_test.cpp132 const size_t alignment = sysconf(_SC_PAGESIZE); in TEST_F() local
133 const size_t size = 2 * alignment; in TEST_F()
134 ASSERT_EQ(posix_memalign(&memptr, alignment, size), 0); in TEST_F()
138 char16_t* const emptyString = (char16_t* const)((char*)memptr + alignment - 4); in TEST_F()
141 ASSERT_EQ(mprotect((char*)memptr + alignment, alignment, PROT_NONE), 0); in TEST_F()
146 ASSERT_EQ(mprotect((char*)memptr + alignment, alignment, PROT_READ | PROT_WRITE), 0); in TEST_F()
/system/core/fs_mgr/liblp/include/liblp/
Dpartition_opener.h29 BlockDeviceInfo() : size(0), alignment(0), alignment_offset(0), logical_block_size(0) {} in BlockDeviceInfo()
30 BlockDeviceInfo(const std::string& partition_name, uint64_t size, uint32_t alignment, in BlockDeviceInfo()
33 alignment(alignment), in BlockDeviceInfo()
41 uint32_t alignment; member
/system/libhwbinder/
DDebug.cpp161 size_t alignment, bool cStyle, in printHexData() argument
164 if (alignment == 0) { in printHexData()
165 if (bytesPerLine >= 16) alignment = 4; in printHexData()
166 else if (bytesPerLine >= 8) alignment = 2; in printHexData()
167 else alignment = 1; in printHexData()
225 size_t align_offset = alignment-(alignment?1:0); in printHexData()
231 … for (index = 0; index < alignment || (alignment == 0 && index < bytesPerLine); index++) { in printHexData()
234 if (index == 0 && word > 0 && alignment > 0) { in printHexData()
DTextOutput.h97 inline HexDump& setAlignment(size_t alignment);
104 inline size_t alignment() const;
182 inline HexDump& HexDump::setAlignment(size_t alignment) { in setAlignment() argument
183 mAlignment = alignment; return *this; in setAlignment()
193 inline size_t HexDump::alignment() const { return mAlignment; } in alignment() function
DTextOutput.cpp68 val.singleLineCutoff(), val.alignment(), val.carrayStyle(), in operator <<()
/system/core/libcutils/
Dmemset_test.cpp91 static void *GetAlignedPtr(void *orig_ptr, int alignment, int or_mask) { in GetAlignedPtr() argument
93 if (alignment > 0) { in GetAlignedPtr()
97 ptr += alignment - (ptr & (alignment - 1)); in GetAlignedPtr()
98 ptr |= alignment | or_mask; in GetAlignedPtr()
Dfs_config.cpp51 #define ALIGN(x, alignment) (((x) + ((alignment)-1)) & ~((alignment)-1)) argument
/system/core/fs_mgr/liblp/
Dutility.h72 bool AlignTo(T base, uint32_t alignment, T* out) { in AlignTo() argument
75 if (!alignment) { in AlignTo()
79 T remainder = base % alignment; in AlignTo()
84 T to_add = alignment - remainder; in AlignTo()
Dbuilder_test.cpp180 device_info.alignment = 0; in TEST_F()
185 device_info.alignment = 12 * 1024; in TEST_F()
196 device_info.alignment = 11 * 1024; in TEST_F()
233 ASSERT_TRUE(AlignTo(lba, device_info.alignment, &aligned_lba)); in TEST_F()
444 device_info.alignment = 131072; in TEST_F()
448 device_info.alignment = 0; in TEST_F()
463 EXPECT_EQ(new_info.alignment, device_info.alignment); in TEST_F()
467 device_info.alignment = 0; in TEST_F()
471 EXPECT_EQ(new_info.alignment, 4096); in TEST_F()
474 device_info.alignment = 8192; in TEST_F()
[all …]
Dbuilder.cpp381 if (device_info.alignment % LP_SECTOR_SIZE != 0) { in VerifyDeviceProperties()
386 if (device_info.alignment_offset > device_info.alignment) { in VerifyDeviceProperties()
432 out.alignment = device_info.alignment; in Init()
447 if (out.alignment) { in Init()
448 ok = AlignTo(free_area_start, out.alignment, &free_area_start); in Init()
492 if (super.alignment || super.alignment_offset) { in Init()
493 ok = AlignTo(free_area_start, super.alignment, &free_area_start); in Init()
996 if (!AlignTo(lba, block_device.alignment, out)) { in AlignSector()
1030 info->alignment = block_devices_[index].alignment; in GetBlockDeviceInfo()
1065 if (device_info.alignment) { in UpdateBlockDeviceInfo()
[all …]
Ddevice_test.cpp52 EXPECT_EQ(device_info.alignment % LP_SECTOR_SIZE, 0); in TEST_F()
Dutility_test.cpp63 std::optional<uint64_t> AlignTo(uint64_t base, uint32_t alignment) { in AlignTo() argument
65 if (!AlignTo(base, alignment, &r)) { in AlignTo()
/system/libziparchive/
Dzip_writer.cc134 uint32_t alignment = 0; in StartEntry() local
137 alignment = 4; in StartEntry()
139 return StartAlignedEntryWithTime(path, flags, time_t(), alignment); in StartEntry()
142 int32_t ZipWriter::StartAlignedEntry(std::string_view path, size_t flags, uint32_t alignment) { in StartAlignedEntry() argument
143 return StartAlignedEntryWithTime(path, flags, time_t(), alignment); in StartAlignedEntry()
147 uint32_t alignment = 0; in StartEntryWithTime() local
150 alignment = 4; in StartEntryWithTime()
152 return StartAlignedEntryWithTime(path, flags, time, alignment); in StartEntryWithTime()
202 uint32_t alignment) { in StartAlignedEntryWithTime() argument
216 if (powerof2(alignment) == 0) { in StartAlignedEntryWithTime()
[all …]
Dzip_archive_benchmark.cpp95 auto alignment = uint32_t(state.range(0)); in StartAlignedEntry() local
99 writer.StartAlignedEntry(name + std::to_string(counter++), 0, alignment); in StartAlignedEntry()
/system/extras/partition_tools/
Dlpmake.cc137 uint32_t alignment = kDefaultPartitionAlignment; in main() local
193 if (!android::base::ParseUint(optarg, &alignment)) { in main()
239 info.alignment = kDefaultPartitionAlignment; in main()
241 !android::base::ParseUint(parts[2].c_str(), &info.alignment)) { in main()
301 … block_devices.emplace_back(super_name, blockdevice_size, alignment, alignment_offset, block_size); in main()
DREADME.md19 * `--alignment=N` - By default, lpmake will align partitions to 1MiB boundaries. However, an altern…
20 * `--alignment-offset=N` - In some cases, the "super" partition is misaligned within its parent blo…
22 …quire a specific block size. That block size can be specified here. The alignment must be a multip…
/system/libziparchive/include/ziparchive/
Dzip_writer.h116 int32_t StartAlignedEntry(std::string_view path, size_t flags, uint32_t alignment);
126 …_t StartAlignedEntryWithTime(std::string_view path, size_t flags, time_t time, uint32_t alignment);
/system/extras/simpleperf/
Dutils.h33 static inline uint64_t Align(uint64_t value, uint64_t alignment) { in Align() argument
34 return (value + alignment - 1) & ~(alignment - 1); in Align()
Dread_elf_test.cpp49 for (size_t alignment = 0; alignment <= 3; ++alignment) { in TEST() local
50 char* start = data.data() + alignment; in TEST()
/system/libhwbinder/include/hwbinder/
DDebug.h39 size_t alignment=0, bool cArrayStyle=false,
/system/extras/memory_replay/traces/
DREADME50 <tid>:memalign <ptr> <alignment> <size>
51 Allocation made by memalign(<alignment>, <size>). <ptr> is the value
/system/sepolicy/prebuilts/api/29.0/public/
Dupdate_engine_common.te68 # ioctl on super device to get block device alignment and alignment offset
/system/chre/host/msm/daemon/generated/
Dchre_slpi_skel.c155 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, __FILE_LINE__, s… argument
157 #define _ALLOCATE(nErr, pal, size, alignment, pv) _TRY(nErr, _allocator_alloc(pal, 0, size, alignme… argument
/system/sepolicy/prebuilts/api/30.0/public/
Dupdate_engine_common.te71 # ioctl on super device to get block device alignment and alignment offset
/system/sepolicy/public/
Dupdate_engine_common.te71 # ioctl on super device to get block device alignment and alignment offset

12