/frameworks/libs/binary_translation/tests/ndk_program_tests/ |
D | proc_self_maps_test.cc | 68 const size_t kPageSize = sysconf(_SC_PAGESIZE); in TEST() local 70 mmap(0, 3 * kPageSize, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST() 73 ASSERT_FALSE(IsExecutable(mapping, 3 * kPageSize)); in TEST() 75 void* exec_mapping = mmap(mapping + kPageSize, in TEST() 76 kPageSize, in TEST() 83 ASSERT_FALSE(IsExecutable(mapping, kPageSize)); in TEST() 85 ASSERT_TRUE(IsExecutable<kExactMapping>(mapping + kPageSize, kPageSize)); in TEST() 86 ASSERT_FALSE(IsExecutable(mapping + 2 * kPageSize, kPageSize)); in TEST() 88 ASSERT_EQ(munmap(mapping, 3 * kPageSize), 0); in TEST() 92 const size_t kPageSize = sysconf(_SC_PAGESIZE); in TEST() local [all …]
|
/frameworks/libs/binary_translation/base/ |
D | large_mmap_test.cc | 29 auto large_p1 = static_cast<uint8_t*>(LargeMmapOrDie(kPageSize)); in TEST() 30 auto p1 = static_cast<uint8_t*>(MmapOrDie(kPageSize)); in TEST() 31 auto p2 = static_cast<uint8_t*>(MmapOrDie(kPageSize)); in TEST() 32 auto large_p2 = static_cast<uint8_t*>(LargeMmapOrDie(kPageSize)); in TEST() 41 MunmapOrDie(large_p1, kPageSize); in TEST() 42 MunmapOrDie(large_p2, kPageSize); in TEST() 43 MunmapOrDie(p1, kPageSize); in TEST() 44 MunmapOrDie(p2, kPageSize); in TEST()
|
D | memfd_backed_mmap.cc | 31 const size_t kPageSize = sysconf(_SC_PAGE_SIZE); in CreateAndFillMemfd() local 33 CHECK_EQ(memfd_file_size % kPageSize, 0); in CreateAndFillMemfd() 56 const size_t kPageSize = sysconf(_SC_PAGE_SIZE); in CreateMemfdBackedMapOrDie() local 58 CHECK_EQ(memfd_file_size % kPageSize, 0); in CreateMemfdBackedMapOrDie()
|
D | forever_alloc_test.cc | 32 ASSERT_GE(AlignDownPageSize(p) + kPageSize, p + size); in CheckOneAllocation() 37 size_t num_allocations = kPageSize % aligned_size; in CheckBasicAllocations() 64 CheckBasicAllocations(kPageSize / 2 + 1, kPageSize); in TEST()
|
D | mapped_file_fragment.cc | 30 const off64_t kPageMask = ~static_cast<off64_t>(berberis::kPageSize - 1); 37 return static_cast<size_t>(offset & (berberis::kPageSize - 1)); in page_offset()
|
D | exec_region_elf_backed.cc | 51 CHECK(region_start_addr % kPageSize == 0); in Create() 56 CHECK(region_end_addr % kPageSize == 0); in Create()
|
/frameworks/libs/binary_translation/tests/ndk_program_tests/riscv64/ |
D | handle_not_executable_test.cc | 96 const long kPageSize = sysconf(_SC_PAGESIZE); in TEST() local 99 0, kPageSize * 2, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST() 101 uint32_t* second_page = first_page + (kPageSize / sizeof(uint32_t)); in TEST() 103 mprotect(second_page, kPageSize, PROT_READ | PROT_WRITE); in TEST() 113 munmap(first_page, kPageSize * 2); in TEST()
|
D | runtime_code_patching_test.cc | 87 const long kPageSize = sysconf(_SC_PAGESIZE); in TEST() local 89 mmap(0, kPageSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST() 100 munmap(code, kPageSize); in TEST()
|
/frameworks/libs/binary_translation/tests/ndk_program_tests/arm64/ |
D | handle_not_executable_test.cc | 90 const long kPageSize = sysconf(_SC_PAGESIZE); in TEST() local 93 0, kPageSize * 2, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST() 95 uint32_t* second_page = first_page + (kPageSize / sizeof(uint32_t)); in TEST() 97 mprotect(second_page, kPageSize, PROT_READ | PROT_WRITE); in TEST() 107 munmap(first_page, kPageSize * 2); in TEST()
|
/frameworks/libs/binary_translation/tests/ndk_program_tests/arm/ |
D | handle_not_executable_test.cc | 90 const long kPageSize = sysconf(_SC_PAGESIZE); in TEST() local 93 0, kPageSize * 2, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)); in TEST() 95 uint32_t* second_page = first_page + (kPageSize / sizeof(uint32_t)); in TEST() 97 mprotect(second_page, kPageSize, PROT_READ | PROT_WRITE); in TEST() 107 munmap(first_page, kPageSize * 2); in TEST()
|
/frameworks/libs/binary_translation/base/include/berberis/base/ |
D | forever_alloc.h | 39 static_assert(sizeof(T) < kPageSize, "ForeverAllocator: bad type"); in Allocate() 45 CHECK_LT(size, static_cast<size_t>(kPageSize)); in Allocate() 52 void* ptr = MmapOrDie(kPageSize); in AllocatePage() 58 MunmapOrDie(ptr, kPageSize); in AllocatePage() 73 uintptr_t end = AlignDownPageSize(curr) + kPageSize; in AllocateImpl()
|
D | mmap.h | 32 return AlignDown(x, kPageSize); in AlignDownPageSize() 37 return AlignUp(x, kPageSize); in AlignUpPageSize() 42 return IsAligned(x, kPageSize); in IsAlignedPageSize()
|
D | page_size.h | 51 inline const PageSize kPageSize; variable
|
/frameworks/av/media/utils/tests/ |
D | shared_memory_allocator_tests.cpp | 29 const size_t kPageSize = getpagesize(); variable 34 memset(block->unsecurePointer(), 10, kPageSize); in validate_block() 97 EXPECT_EQ(memory->size(), static_cast<unsigned>(kPageSize)); in TEST() 112 ASSERT_EQ(MemoryHeapBaseAllocator::alignment(), kPageSize); in TEST() 191 const auto memory = allocator.allocate(NamedAllocRequest{{kPageSize}, "allocation"}); in TEST() 204 const auto memory = allocator.allocate(NamedAllocRequest{{kPageSize}, "allocation"}); in TEST() 210 const auto memory2 = allocator.allocate(NamedAllocRequest{{kPageSize}, "allocation_2"}); in TEST() 254 ASSERT_EQ(decltype(fallback_allocator)::alignment(), kPageSize); in TEST()
|
/frameworks/base/libs/protoutil/tests/ |
D | EncodedBuffer_test.cpp | 24 const size_t kPageSize = getpagesize(); variable 25 const size_t TEST_CHUNK_SIZE = (__TEST_CHUNK_SIZE + (kPageSize - 1)) & ~(kPageSize - 1);
|
/frameworks/base/libs/protoutil/src/ |
D | EncodedBuffer.cpp | 30 const size_t kPageSize = getpagesize(); variable 97 mChunkSize = (chunkSize + (kPageSize - 1)) & ~(kPageSize - 1); in EncodedBuffer()
|
/frameworks/libs/binary_translation/tiny_loader/tests/ |
D | tiny_loader_tests.cc | 118 elf_filepath.c_str(), base_addr, berberis::kPageSize, &memory_elf_file, &error_msg)) in TestLoadLibrary() 173 berberis::kPageSize, in TEST()
|
/frameworks/base/services/core/jni/ |
D | com_android_server_am_CachedAppOptimizer.cpp | 57 static const size_t kPageSize = getpagesize(); variable 58 static const size_t kPageMask = ~(kPageSize - 1); 264 bytesProcessedInSend += kPageSize; in madviseVmasFromBatch()
|
/frameworks/libs/binary_translation/tiny_loader/ |
D | tiny_loader.cc | 54 return berberis::AlignDown(addr, berberis::kPageSize); in page_align_down() 59 return berberis::AlignUp(addr, berberis::kPageSize); in page_align_up() 378 } else if (align <= berberis::kPageSize) { in ReserveAddressSpace() 477 berberis::kPageSize - page_offset(seg_file_end)); in LoadSegments()
|
/frameworks/av/media/libdatasource/include/datasource/ |
D | NuCachedSource2.h | 87 kPageSize = 65536,
|
/frameworks/base/core/jni/ |
D | com_android_internal_content_NativeLibraryHelper.cpp | 136 static const size_t kPageSize = getpagesize(); in copyFileIfChanged() local 170 if (offset % kPageSize != 0) { in copyFileIfChanged() 172 "from apk.\n", fileName, kPageSize); in copyFileIfChanged()
|
/frameworks/av/media/codec2/fuzzer/ |
D | C2Fuzzer.cpp | 242 static const size_t kPageSize = getpagesize(); in decodeFrames() local 274 int32_t alignedSize = C2FUZZER_ALIGN(frameSize, kPageSize); in decodeFrames()
|
/frameworks/av/media/codec2/vndk/ |
D | C2DmaBufAllocator.cpp | 173 static const size_t kPageSize = getpagesize(); in map() local 196 size_t alignmentBytes = offset % kPageSize; in map()
|
/frameworks/native/vulkan/libvulkan/ |
D | layers_extensions.cpp | 382 static const size_t kPageSize = getpagesize(); in ForEachFileInZip() local 410 if (entry.method != kCompressStored || entry.offset % kPageSize != 0) in ForEachFileInZip()
|
/frameworks/av/media/utils/include/mediautils/ |
D | SharedMemoryAllocator.h | 459 static size_t alignment() { return kPageSize; } 486 static inline const size_t kPageSize = getpagesize();
|