Home
last modified time | relevance | path

Searched refs:page_sz (Results 1 – 22 of 22) sorted by relevance

/external/ltp/testcases/kernel/syscalls/remap_file_pages/
Dremap_file_pages01.c94 static int page_sz; variable
153 char *page = cache_contents + i * page_sz; in test_nonlinear()
177 char *page = data + i * page_sz; in test_nonlinear()
179 if (remap_file_pages(page, page_sz * 2, 0, in test_nonlinear()
184 page, (page_sz * 2), (window_pages - i - 2)); in test_nonlinear()
194 if (data[i * page_sz] != window_pages - i) { in test_nonlinear()
198 (i * page_sz), data[i * page_sz], i, in test_nonlinear()
203 if (data[i * page_sz] != window_pages - i - 2) { in test_nonlinear()
207 (i * page_sz), data[i * page_sz], i, in test_nonlinear()
231 page_sz = getpagesize(); in setup()
[all …]
Dremap_file_pages02.c85 static int page_sz; variable
218 testcase[test].size = page_sz; in setup01()
230 testcase[test].size = page_sz; in setup02()
242 testcase[test].size = cache_sz + page_sz; in setup03()
254 testcase[test].size = page_sz; in setup04()
275 if ((page_sz = getpagesize()) < 0) { in setup()
280 page_words = (page_sz / sizeof(char)); in setup()
284 cache_sz = cache_pages * page_sz; in setup()
288 char *page = cache_contents + i * page_sz; in setup()
/external/ltp/testcases/kernel/syscalls/mmap/
Dmmap04.c57 static size_t page_sz; variable
82 addr = mmap(0, page_sz, PROT_READ | PROT_EXEC, in main()
95 if (read(fildes, dummy, page_sz) < 0) { in main()
104 if (memcmp(dummy, addr, page_sz)) { in main()
115 if (munmap(addr, page_sz) != 0) { in main()
132 page_sz = getpagesize(); in setup()
134 if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) { in setup()
139 memset(tst_buff, 'A', page_sz); in setup()
150 if (write(fildes, tst_buff, page_sz) < page_sz) { in setup()
169 if ((dummy = calloc(page_sz, sizeof(char))) == NULL) { in setup()
Dmmap02.c55 static size_t page_sz; variable
78 addr = mmap(0, page_sz, PROT_READ, in main()
91 if (read(fildes, dummy, page_sz) < 0) { in main()
100 if (memcmp(dummy, addr, page_sz)) { in main()
110 if (munmap(addr, page_sz) != 0) { in main()
127 page_sz = getpagesize(); in setup()
130 if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) { in setup()
135 memset(tst_buff, 'A', page_sz); in setup()
147 if (write(fildes, tst_buff, page_sz) < page_sz) { in setup()
175 if ((dummy = calloc(page_sz, sizeof(char))) == NULL) { in setup()
Dmmap03.c60 static size_t page_sz; variable
88 addr = mmap(0, page_sz, PROT_EXEC, in main()
102 if (read(fildes, dummy, page_sz) < 0) { in main()
117 if (memcmp(dummy, addr, page_sz)) { in main()
138 if (munmap(addr, page_sz) != 0) { in main()
158 page_sz = getpagesize(); in setup()
161 if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) { in setup()
166 memset(tst_buff, 'A', page_sz); in setup()
178 if (write(fildes, tst_buff, page_sz) < page_sz) { in setup()
199 if ((dummy = calloc(page_sz, sizeof(char))) == NULL) { in setup()
Dmmap06.c52 static size_t page_sz; variable
76 addr = mmap(0, page_sz, PROT_READ, in main()
86 if (munmap(addr, page_sz) != 0) { in main()
112 page_sz = getpagesize(); in setup()
115 if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) { in setup()
120 memset(tst_buff, 'A', page_sz); in setup()
131 if (write(fildes, tst_buff, page_sz) < page_sz) { in setup()
Dmmap07.c53 static size_t page_sz; variable
77 addr = mmap(0, page_sz, PROT_WRITE, in main()
87 if (munmap(addr, page_sz) != 0) { in main()
114 page_sz = getpagesize(); in setup()
117 if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) { in setup()
123 memset(tst_buff, 'A', page_sz); in setup()
134 if (write(fildes, tst_buff, page_sz) < page_sz) { in setup()
Dmmap08.c48 static size_t page_sz; variable
72 addr = mmap(0, page_sz, PROT_WRITE, in main()
81 if (munmap(addr, page_sz) != 0) { in main()
106 page_sz = getpagesize(); in setup()
108 if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) { in setup()
114 memset(tst_buff, 'A', page_sz); in setup()
125 if (write(fildes, tst_buff, page_sz) != page_sz) { in setup()
Dmmap01.c58 static size_t page_sz; variable
83 addr = mmap(addr, page_sz, PROT_READ | PROT_WRITE, in main()
97 if (memcmp(&addr[file_sz], dummy, page_sz - file_sz)) { in main()
114 if (msync(addr, page_sz, MS_SYNC) != 0) { in main()
134 if (munmap(addr, page_sz) != 0) { in main()
178 page_sz = getpagesize(); in setup()
181 if ((dummy = calloc(page_sz, sizeof(char))) == NULL) { in setup()
194 if ((intptr_t) sbrk(SHMLBA + page_sz) == -1) { in setup()
200 memset(addr, 'A', page_sz); in setup()
Dmmap05.c57 static size_t page_sz; variable
85 addr = mmap(0, page_sz, PROT_NONE, in main()
117 if (munmap((void *)addr, page_sz) != 0) { in main()
136 page_sz = getpagesize(); in setup()
139 if ((tst_buff = calloc(page_sz, sizeof(char))) == NULL) { in setup()
144 memset(tst_buff, 'A', page_sz); in setup()
156 if (write(fildes, tst_buff, page_sz) != page_sz) { in setup()
Dmmap13.c49 static size_t page_sz; variable
71 addr = mmap(NULL, page_sz * 2, PROT_READ | PROT_WRITE, in main()
81 ch = addr + page_sz + 1; in main()
92 if (munmap(addr, page_sz * 2) != 0) in main()
109 page_sz = getpagesize(); in setup()
118 if (ftruncate(fildes, page_sz / 2) == -1) in setup()
Dmmap12.c100 size_t page_sz; in page_check() local
105 page_sz = getpagesize(); in page_check()
107 num_pages = MMAPSIZE / page_sz; in page_check()
108 index = (vmstart / page_sz) * sizeof(uint64_t); in page_check()
134 "present", i, vmstart + i * page_sz); in page_check()
/external/ltp/testcases/kernel/syscalls/mprotect/
Dmprotect04.c98 int page_sz; in testfunc_protnone() local
102 page_sz = getpagesize(); in testfunc_protnone()
104 addr = SAFE_MMAP(cleanup, 0, page_sz, PROT_READ | PROT_WRITE, in testfunc_protnone()
108 TEST(mprotect(addr, page_sz, PROT_NONE)); in testfunc_protnone()
130 SAFE_MUNMAP(cleanup, addr, page_sz); in testfunc_protnone()
198 uintptr_t page_sz = getpagesize(); in get_func() local
199 uintptr_t page_mask = ~(page_sz - 1); in get_func()
200 uintptr_t func_page_offset = (uintptr_t)&exec_func & (page_sz - 1); in get_func()
211 memcpy(mem, page_to_copy, page_sz); in get_func()
214 mem += page_sz; in get_func()
[all …]
/external/ltp/testcases/kernel/syscalls/munmap/
Dmunmap02.c85 static size_t page_sz; variable
168 page_sz = getpagesize(); in setup()
174 map_len = 3 * page_sz; in setup()
225 addr = (char *)((long)addr + page_sz); in setup()
226 map_len = map_len - page_sz; in setup()
262 addr = (char *)((long)addr - page_sz); in cleanup()
263 map_len = map_len - page_sz; in cleanup()
Dmunmap03.c48 static size_t page_sz; variable
86 page_sz = (size_t)sysconf(_SC_PAGESIZE); in setup()
88 global_maplen = page_sz * 2; in setup()
118 map_len = page_sz * 2; in test_einval1()
145 size_t map_len = page_sz; in test_einval3()
Dmunmap01.c152 size_t page_sz; in setup() local
164 page_sz = getpagesize(); in setup()
170 map_len = 3 * page_sz; in setup()
/external/ltp/testcases/kernel/syscalls/msync/
Dmsync02.c81 size_t page_sz; /* system page size */ variable
94 TEST(msync(addr, page_sz, MS_INVALIDATE)); in main()
116 if ((page_sz = getpagesize()) == -1) in setup()
125 while (c_total < page_sz) { in setup()
132 addr = mmap(0, page_sz, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, in setup()
149 if (munmap(addr, page_sz) == -1) in cleanup()
Dmsync01.c82 size_t page_sz; /* system page size */ variable
103 TEST(msync(addr, page_sz, MS_ASYNC)); in main()
162 if ((page_sz = getpagesize()) == -1) in setup()
170 while (c_total < page_sz) { in setup()
182 addr = mmap(0, page_sz, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, in setup()
195 if (munmap(addr, page_sz) == -1) in cleanup()
Dmsync03.c65 static size_t page_sz; variable
118 page_sz = (size_t)sysconf(_SC_PAGESIZE); in setup()
123 while (nwrite < page_sz) { in setup()
128 addr1 = SAFE_MMAP(cleanup, 0, page_sz, PROT_READ | PROT_WRITE, in setup()
147 TEST(msync(*(tc->addr), page_sz, tc->flags)); in msync_verify()
165 if (addr1 && munmap(addr1, page_sz) < 0) in cleanup()
/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/
Dhugemmap01.c85 long page_sz = 0; in main() local
118 page_sz = read_meminfo("Hugepagesize:") * 1024; in main()
120 addr = mmap(NULL, page_sz, PROT_READ | PROT_WRITE, in main()
147 if (munmap(addr, page_sz) != 0) in main()
Dhugemmap02.c84 long page_sz, map_sz; in main() local
104 page_sz = getpagesize(); in main()
141 addr = mmap((void *)low_addr, page_sz, PROT_READ, in main()
184 if (munmap(addr, page_sz) == -1) in main()
/external/ltp/testcases/kernel/syscalls/mremap/
Dmremap03.c154 int page_sz; /* system page size */ in setup() local
161 if ((page_sz = getpagesize()) < 0) { in setup()
167 memsize = (1000 * page_sz); in setup()