Home
last modified time | relevance | path

Searched refs:pagesize (Results 1 – 16 of 16) sorted by relevance

/system/core/libunwindstack/tests/
DMemoryFileTest.cpp68 size_t pagesize = getpagesize(); in TEST_F() local
70 for (size_t i = 0; i < pagesize; i++) { in TEST_F()
76 ASSERT_TRUE(memory_.Init(tf_->path, pagesize + 15)); in TEST_F()
84 size_t pagesize = getpagesize(); in TEST_F() local
86 for (size_t i = 0; i < 2 * pagesize; i++) { in TEST_F()
87 data += static_cast<char>((i / pagesize) + '0'); in TEST_F()
92 ASSERT_TRUE(memory_.Init(tf_->path, 2 * pagesize)); in TEST_F()
99 expected_str += static_cast<char>(((i + pagesize) % 10) + '0'); in TEST_F()
105 size_t pagesize = getpagesize(); in TEST_F() local
107 for (size_t i = 0; i < 2 * pagesize; i++) { in TEST_F()
[all …]
DMemoryRemoteTest.cpp156 int pagesize = getpagesize(); in TEST_F() local
157 void* src = mmap(nullptr, pagesize * 2, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE,-1, 0); in TEST_F()
158 memset(src, 0x4c, pagesize * 2); in TEST_F()
161 ASSERT_EQ(0, munmap(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(src) + pagesize), in TEST_F()
162 pagesize)); in TEST_F()
176 std::vector<uint8_t> dst(pagesize); in TEST_F()
177 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src), dst.data(), pagesize)); in TEST_F()
182 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize, dst.data(), 1)); in TEST_F()
183 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 1, dst.data(), 1)); in TEST_F()
184 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 4, dst.data(), 8)); in TEST_F()
[all …]
/system/extras/memory_replay/
DAlloc.cpp100 int pagesize = getpagesize(); in MallocExecute() local
103 MakeAllocationResident(memory, entry.size, pagesize); in MallocExecute()
112 int pagesize = getpagesize(); in CallocExecute() local
115 MakeAllocationResident(memory, entry.u.n_elements * entry.size, pagesize); in CallocExecute()
129 int pagesize = getpagesize(); in ReallocExecute() local
132 MakeAllocationResident(memory, entry.size, pagesize); in ReallocExecute()
141 int pagesize = getpagesize(); in MemalignExecute() local
144 MakeAllocationResident(memory, entry.size, pagesize); in MemalignExecute()
DUtils.h28 static __always_inline void MakeAllocationResident(void* ptr, size_t nbytes, int pagesize) { in MakeAllocationResident() argument
30 for (size_t i = 0; i < nbytes; i += pagesize) { in MakeAllocationResident()
DPointers.cpp30 size_t pagesize = getpagesize(); in Pointers() local
33 pointers_size_ = (max_allocs * 4 * sizeof(pointer_data) + pagesize - 1) & ~(pagesize - 1); in Pointers()
DThreads.cpp51 size_t pagesize = getpagesize(); in Threads() local
52 data_size_ = (max_threads_ * sizeof(Thread) + pagesize - 1) & ~(pagesize - 1); in Threads()
DTraceBenchmark.cpp153 int pagesize = getpagesize(); in RunTrace() local
167 MakeAllocationResident(ptr, entry.size, pagesize); in RunTrace()
182 MakeAllocationResident(ptr, entry.size, pagesize); in RunTrace()
197 MakeAllocationResident(ptr, entry.size, pagesize); in RunTrace()
218 MakeAllocationResident(ptr, entry.size, pagesize); in RunTrace()
/system/tools/mkbootimg/
Dmkbootimg.py58 num_kernel_pages = get_number_of_pages(filesize(args.kernel), args.pagesize)
59 num_ramdisk_pages = get_number_of_pages(filesize(args.ramdisk), args.pagesize)
60 num_second_pages = get_number_of_pages(filesize(args.second), args.pagesize)
61 dtbo_offset = args.pagesize * (num_header_pages + num_kernel_pages +
92 args.pagesize, # flash page size we assume
104 pad_file(args.vendor_boot, args.pagesize)
128 args.pagesize, # flash page size we assume
169 pad_file(args.output, args.pagesize)
273 def write_data(args, pagesize): argument
274 write_padded_file(args.output, args.kernel, pagesize)
[all …]
/system/extras/tests/pagingtest/
Dthrashing_test.c23 long pagesize; in thrashing_test() local
28 pagesize = sysconf(_SC_PAGE_SIZE); in thrashing_test()
34 filesize = num_pages * pagesize / (ARRAY_SIZE(fds) - 1); in thrashing_test()
62 for (k = 0; k < filesize; k += pagesize) { in thrashing_test()
Dpageinout_test.c22 long pagesize = sysconf(_SC_PAGE_SIZE); in pageinout_test() local
59 for (j = 0; j < file_size; j += pagesize) { in pageinout_test()
/system/memory/libmeminfo/
Dpageacct.cpp35 uint64_t pagesize(void) { in pagesize() function
36 static uint64_t pagesize = sysconf(_SC_PAGE_SIZE); in pagesize() local
37 return pagesize; in pagesize()
Dlibmeminfo_test.cpp133 size_t pagesize = getpagesize(); in TEST() local
134 void* ptr = mmap(nullptr, pagesize * (kNumPages + 2), PROT_READ | PROT_WRITE, in TEST()
140 ASSERT_EQ(0, munmap(ptr, pagesize)); in TEST()
141 uintptr_t addr = reinterpret_cast<uintptr_t>(ptr) + pagesize; in TEST()
142 ASSERT_EQ(0, munmap(reinterpret_cast<void*>(addr + kNumPages * pagesize), pagesize)); in TEST()
171 data[pagesize * 5] = 1; in TEST()
172 data[pagesize * 11] = 1; in TEST()
186 ASSERT_EQ(0, munmap(reinterpret_cast<void*>(addr), kNumPages * pagesize)); in TEST()
/system/extras/kexec_tools/
Dkexecload.c24 #define ROUND_TO_PAGE(address,pagesize) (((address) + (pagesize) - 1) & (~((pagesize) - 1))) argument
/system/core/liblog/
Dproperties.cpp500 static long pages, pagesize; in __android_logger_valid_buffer_size() local
514 if (!pagesize) { in __android_logger_valid_buffer_size()
515 pagesize = sysconf(_SC_PAGESIZE); in __android_logger_valid_buffer_size()
516 if (pagesize <= 1) { in __android_logger_valid_buffer_size()
517 pagesize = PAGE_SIZE; in __android_logger_valid_buffer_size()
523 maximum = pages * pagesize; in __android_logger_valid_buffer_size()
/system/core/storaged/
Dstoraged.cpp216 uint32_t pagesize = sysconf(_SC_PAGESIZE); in prepare_proto() local
221 pagesize); in prepare_proto()
224 while (!IS_ALIGNED(proto->ByteSize(), pagesize)) { in prepare_proto()
232 pagesize, proto->ByteSize())) { in prepare_proto()
/system/core/libbacktrace/
Dbacktrace_test.cpp1020 size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); in ThreadReadTest() local
1022 if (posix_memalign(reinterpret_cast<void**>(&memory), pagesize, 2 * pagesize) != 0) { in ThreadReadTest()
1026 if (mprotect(&memory[pagesize], pagesize, PROT_NONE) != 0) { in ThreadReadTest()
1031 InitMemory(memory, pagesize); in ThreadReadTest()
1044 if (mprotect(&memory[pagesize], pagesize, PROT_READ | PROT_WRITE) != 0) { in ThreadReadTest()
1055 size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE)); in RunReadTest() local
1058 uint8_t* expected = new uint8_t[pagesize]; in RunReadTest()
1059 InitMemory(expected, pagesize); in RunReadTest()
1061 uint8_t* data = new uint8_t[2 * pagesize]; in RunReadTest()
1063 size_t bytes_read = backtrace->Read(read_addr, data, 2 * pagesize); in RunReadTest()
[all …]