Home
last modified time | relevance | path

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

12

/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/mkbootimg/
Dunpack_bootimg40 def get_number_of_pages(image_size, page_size): argument
42 return (image_size + page_size - 1) / page_size
74 page_size = kernel_ramdisk_second_info[7]
89 num_kernel_pages = get_number_of_pages(kernel_size, page_size)
90 kernel_offset = page_size * num_header_pages # header occupies a page
93 num_ramdisk_pages = get_number_of_pages(ramdisk_size, page_size)
94 ramdisk_offset = page_size * (num_header_pages + num_kernel_pages
98 second_offset = page_size * (
Dmkbootimg48 def get_number_of_pages(image_size, page_size): argument
50 return (image_size + page_size - 1) / page_size
/system/core/libunwindstack/tests/
DMemoryRemoteTest.cpp236 size_t page_size = getpagesize(); in TEST_F() local
240 memset(mapping, 0xFF, 3 * page_size); in TEST_F()
241 ASSERT_EQ(0, mprotect(static_cast<char*>(mapping) + page_size, page_size, PROT_NONE)); in TEST_F()
251 ASSERT_EQ(0, munmap(mapping, 3 * page_size)); in TEST_F()
257 size_t read_size = remote.Read(reinterpret_cast<uint64_t>(mapping), dst.data(), page_size * 3); in TEST_F()
259 ASSERT_LE(page_size, read_size); in TEST_F()
269 size_t page_size = getpagesize(); in TEST_F() local
273 memset(mapping, 0xFF, 3 * page_size); in TEST_F()
274 ASSERT_EQ(0, munmap(static_cast<char*>(mapping) + page_size, page_size)); in TEST_F()
285 ASSERT_EQ(0, munmap(mapping, page_size)); in TEST_F()
[all …]
/system/core/fastboot/
Dbootimg_utils.cpp44 int64_t second_size, off_t second_offset, size_t page_size, size_t base, in mkbootimg() argument
46 size_t page_mask = page_size - 1; in mkbootimg()
71 hdr->page_size = page_size; in mkbootimg()
78 memcpy(hdr->magic + page_size, kernel, kernel_size); in mkbootimg()
79 memcpy(hdr->magic + page_size + kernel_actual, ramdisk, ramdisk_size); in mkbootimg()
80 memcpy(hdr->magic + page_size + kernel_actual + ramdisk_actual, second, second_size); in mkbootimg()
Dbootimg_utils.h39 int64_t second_size, off_t second_offset, size_t page_size, size_t base,
/system/extras/kexec_tools/
Dkexecload.c75 int page_size = getpagesize(); in main() local
125 atag_size = ROUND_TO_PAGE(get_file_size(atag_file), page_size); in main()
126 zimage_size = ROUND_TO_PAGE(get_file_size(zimage_file), page_size); in main()
/system/extras/simpleperf/
Devent_fd.cpp155 size_t page_size = sysconf(_SC_PAGE_SIZE); in CreateMappedBuffer() local
156 size_t mmap_len = (mmap_pages + 1) * page_size; in CreateMappedBuffer()
176 mmap_data_buffer_ = reinterpret_cast<char*>(mmap_addr_) + page_size; in CreateMappedBuffer()
177 mmap_data_buffer_size_ = mmap_len_ - page_size; in CreateMappedBuffer()
Dtracing.cpp99 uint32_t GetPageSize() const { return page_size; } in GetPageSize()
106 uint32_t page_size; member in TracingFile
123 page_size = static_cast<uint32_t>(::GetPageSize()); in TracingFile()
185 AppendData(ret, page_size); in BinaryFormat()
215 MoveFromBinaryFormat(page_size, p); in LoadFromBinary()
/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/libufdt/utils/src/
Dmkdtimg_core.c40 uint32_t page_size; member
71 options->page_size = DT_TABLE_DEFAULT_PAGE_SIZE; in init_dt_global_options()
182 header.page_size = cpu_to_fdt32(options->page_size); in output_img_header()
301 global_options->page_size = strtoul(value, NULL, 0); in set_global_options()
Ddt_table.h43 uint32_t page_size; /* flash page size we assume */ member
Ddt_table.c35 header->page_size = cpu_to_fdt32(DT_TABLE_DEFAULT_PAGE_SIZE); in dt_table_header_init()
Dmkdtboimg.py188 self.dt_entries_offset, self.page_size,
234 self.page_size, self.version) = struct.unpack_from('>8I', buf, 0)
320 def __init__(self, file_handle, page_size=None, version=0): argument
336 if page_size:
343 self.page_size = page_size
705 dtbo = Dtbo(fout, global_args.page_size, global_args.version)
Dmkdtimg_dump.c116 output_prop_int(out_fp, "page_size", header->page_size); in output_table_header()
/system/libufdt/utils/tests/
Dmkdtboimg_testdata.sh55 mkdtimg create ${MKDTIMG_OUT}/create.img --page_size=4096 --id=0x100 --version=1\
61 ../src/mkdtboimg.py create ${MKDTBOIMG_OUTCREATE}/create.img --page_size=4096 \
Dmkdtimg_testdata.sh53 --page_size=4096 --id=/:board_id --rev=/:board_rev --custom0=0xabc --version=1 \
/system/core/libmemunreachable/tests/
DHeapWalker_test.cpp182 const size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
183 void* buffer1 = mmap(NULL, page_size, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); in TEST_F()
190 heap_walker.Allocation(buffer_begin(buffer1), buffer_begin(buffer1) + page_size); in TEST_F()
/system/core/debuggerd/libdebuggerd/test/
Ddump_memory_test.cpp563 size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
564 uintptr_t addr = 0x10000020 + page_size - 120; in TEST_F()
622 size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
623 uintptr_t addr = 0x10000020 + page_size - 192; in TEST_F()
739 size_t page_size = sysconf(_SC_PAGE_SIZE); in TEST_F() local
740 uintptr_t addr = 0x10000020 + page_size - 256; in TEST_F()
/system/libufdt/utils/tests/data/
Dmkdtimg.cfg2 page_size=4096
Dmkdtboimg.cfg2 page_size=4096
/system/core/mkbootimg/include/bootimg/
Dbootimg.h47 uint32_t page_size; /* flash page size we assume */ member
/system/core/debuggerd/libdebuggerd/
Dutility.cpp162 size_t page_size = sysconf(_SC_PAGE_SIZE); local
163 start = ((addr + (page_size - 1)) & ~(page_size - 1)) - addr;
/system/libufdt/utils/
DREADME.md100 The default value of `page_size` in `dt_table_header` is `2048`. You can
101 use `global_option` `--page_size=<number>` to assign a different value.
197 page_size = 2048
/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()

12