Home
last modified time | relevance | path

Searched refs:kPageSize (Results 1 – 25 of 29) sorted by relevance

12

/frameworks/libs/binary_translation/tests/ndk_program_tests/
Dproc_self_maps_test.cc68 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/
Dlarge_mmap_test.cc29 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()
Dmemfd_backed_mmap.cc31 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()
Dforever_alloc_test.cc32 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()
Dmapped_file_fragment.cc30 const off64_t kPageMask = ~static_cast<off64_t>(berberis::kPageSize - 1);
37 return static_cast<size_t>(offset & (berberis::kPageSize - 1)); in page_offset()
Dexec_region_elf_backed.cc51 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/
Dhandle_not_executable_test.cc96 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()
Druntime_code_patching_test.cc87 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/
Dhandle_not_executable_test.cc90 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/
Dhandle_not_executable_test.cc90 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/
Dforever_alloc.h39 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()
Dmmap.h32 return AlignDown(x, kPageSize); in AlignDownPageSize()
37 return AlignUp(x, kPageSize); in AlignUpPageSize()
42 return IsAligned(x, kPageSize); in IsAlignedPageSize()
Dpage_size.h51 inline const PageSize kPageSize; variable
/frameworks/av/media/utils/tests/
Dshared_memory_allocator_tests.cpp29 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/
DEncodedBuffer_test.cpp24 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/
DEncodedBuffer.cpp30 const size_t kPageSize = getpagesize(); variable
97 mChunkSize = (chunkSize + (kPageSize - 1)) & ~(kPageSize - 1); in EncodedBuffer()
/frameworks/libs/binary_translation/tiny_loader/tests/
Dtiny_loader_tests.cc118 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/
Dcom_android_server_am_CachedAppOptimizer.cpp57 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/
Dtiny_loader.cc54 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/
DNuCachedSource2.h87 kPageSize = 65536,
/frameworks/base/core/jni/
Dcom_android_internal_content_NativeLibraryHelper.cpp136 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/
DC2Fuzzer.cpp242 static const size_t kPageSize = getpagesize(); in decodeFrames() local
274 int32_t alignedSize = C2FUZZER_ALIGN(frameSize, kPageSize); in decodeFrames()
/frameworks/av/media/codec2/vndk/
DC2DmaBufAllocator.cpp173 static const size_t kPageSize = getpagesize(); in map() local
196 size_t alignmentBytes = offset % kPageSize; in map()
/frameworks/native/vulkan/libvulkan/
Dlayers_extensions.cpp382 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/
DSharedMemoryAllocator.h459 static size_t alignment() { return kPageSize; }
486 static inline const size_t kPageSize = getpagesize();

12