Home
last modified time | relevance | path

Searched refs:page_size (Results 1 – 15 of 15) sorted by relevance

/system/extras/zram-perf/
Dzram-perf.cpp15 const size_t page_size = 4096; variable
19 for (int i = 0; i < page_size / sizeof(int); i++) { in fillPageRand()
25 for (int i = 0; i < page_size / sizeof(int); i++) { in fillPageCompressible()
65 AlignedAlloc page(page_size, page_size); in fillWithCompressible()
66 for (uint64_t offset = 0; offset < devSize; offset += page_size) { in fillWithCompressible()
68 ssize_t ret = write(m_fd, page.ptr(), page_size); in fillWithCompressible()
69 if (ret != page_size) { in fillWithCompressible()
78 AlignedAlloc page(page_size, page_size); in benchSequentialRead()
82 for (uint64_t offset = 0; offset < devSize; offset += page_size) { in benchSequentialRead()
85 ssize_t ret = read(m_fd, page.ptr(), page_size); in benchSequentialRead()
[all …]
/system/core/fastboot/
Dbootimg_utils.cpp43 size_t page_size, size_t base, off_t tags_offset, in mkbootimg() argument
46 size_t page_mask = page_size - 1; in mkbootimg()
52 *bootimg_size = page_size + kernel_actual + ramdisk_actual + second_actual; in mkbootimg()
70 hdr->page_size = page_size; in mkbootimg()
72 memcpy(hdr->magic + page_size, kernel, kernel_size); in mkbootimg()
73 memcpy(hdr->magic + page_size + kernel_actual, ramdisk, ramdisk_size); in mkbootimg()
74 memcpy(hdr->magic + page_size + kernel_actual + ramdisk_actual, second, second_size); in mkbootimg()
Dbootimg_utils.h40 size_t page_size, size_t base, off_t tags_offset,
Dfastboot.cpp81 static unsigned page_size = 2048; variable
455 page_size, base_addr, tags_offset, &bsize); in load_bootable_image()
1323 page_size = (unsigned)strtoul(optarg, nullptr, 0); in main()
1324 if (!page_size) die("invalid page size"); in main()
/system/extras/verity/
Dverify_boot_signature.c80 static uint64_t page_align(uint64_t n, uint64_t page_size) in page_align() argument
82 return (((n + page_size - 1) / page_size) * page_size); in page_align()
110 if (!hdr.page_size) { in get_signature_offset()
115 *offset = page_align(hdr.page_size in get_signature_offset()
116 + page_align(hdr.kernel_size, hdr.page_size) in get_signature_offset()
117 + page_align(hdr.ramdisk_size, hdr.page_size) in get_signature_offset()
118 + page_align(hdr.second_size, hdr.page_size), in get_signature_offset()
119 hdr.page_size); in get_signature_offset()
/system/core/metricsd/
Dmetrics_collector_test.cc144 const uint64_t page_size = 4096; in TEST_F() local
145 const uint64_t zero_pages = 10 * 1000 * 1000 / page_size; in TEST_F()
156 const uint64_t real_orig_size = orig_data_size + zero_pages * page_size; in TEST_F()
158 zero_pages * page_size * 100 / real_orig_size; in TEST_F()
Dmetrics_collector.cc423 const size_t page_size = 4096; in ReportZram() local
433 orig_data_size += zero_pages * page_size; in ReportZram()
437 const int zero_ratio_percent = zero_pages * page_size * 100 / orig_data_size; in ReportZram()
/system/extras/kexec_tools/
Dkexecload.c76 int page_size = getpagesize(); in main() local
127 atag_size = ROUND_TO_PAGE(get_file_size(atag_file), page_size); in main()
128 zimage_size = ROUND_TO_PAGE(get_file_size(zimage_file), page_size); in main()
/system/extras/simpleperf/
Devent_fd.cpp110 size_t page_size = sysconf(_SC_PAGE_SIZE); in MmapContent() local
111 size_t mmap_len = (mmap_pages + 1) * page_size; in MmapContent()
120 mmap_data_buffer_ = reinterpret_cast<char*>(mmap_addr_) + page_size; in MmapContent()
121 mmap_data_buffer_size_ = mmap_len_ - page_size; in MmapContent()
/system/core/debuggerd/
Dutility.cpp149 size_t page_size = sysconf(_SC_PAGE_SIZE); local
150 start = ((addr + (page_size - 1)) & ~(page_size - 1)) - addr;
/system/core/libmemunreachable/
DHeapWalker.cpp152 const size_t page_size = sysconf(_SC_PAGE_SIZE); in MapOverPage() local
153 void *page = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(addr) & ~(page_size-1)); in MapOverPage()
155 void* ret = mmap(page, page_size, PROT_READ, MAP_ANONYMOUS|MAP_PRIVATE|MAP_FIXED, -1, 0); in MapOverPage()
/system/core/debuggerd/test/
Ddump_memory_test.cpp514 size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
515 uintptr_t addr = 0x10000020 + page_size - 120; in TEST_F()
573 size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
574 uintptr_t addr = 0x10000020 + page_size - 192; in TEST_F()
690 size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
691 uintptr_t addr = 0x10000020 + page_size - 256; in TEST_F()
/system/core/libmemunreachable/tests/
DHeapWalker_test.cpp180 const size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
181 void* buffer1 = mmap(NULL, page_size, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); in TEST_F()
188 heap_walker.Allocation(buffer_begin(buffer1), buffer_begin(buffer1)+page_size); in TEST_F()
/system/core/mkbootimg/
Dbootimg.h45 uint32_t page_size; /* flash page size we assume */ member
/system/extras/showslab/
Dshowslab.c274 unsigned int page_size = getpagesize() / 1024, nr_rows = DEF_NR_ROWS, i; in main() local
343 p->nr_pages * page_size, in main()