Lines Matching refs:len
44 size_t len = PAGE_SIZE; variable
50 char *mem = (char *)mmap(nullptr, len, prot, flags, -1, 0);
53 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
66 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
77 size_t len = PAGE_SIZE; variable
83 char *mem = (char *)mmap(nullptr, len, prot, flags, -1, 0);
86 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
99 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
110 size_t len = PAGE_SIZE; variable
115 char *mem = (char *)mmap(nullptr, len, prot, flags, -1, 0);
125 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
136 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
147 size_t len = PAGE_SIZE; variable
153 char *mem = (char *)mmap(nullptr, len, prot, flags, -1, 0);
156 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
168 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
179 size_t len = PAGE_SIZE; variable
184 char *mem = (char *)mmap(nullptr, len, prot, flags, -1, 0);
195 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
206 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
217 size_t len = PAGE_SIZE; variable
230 int wByte = write(fd, buf, len);
233 char *mem = (char *)mmap(nullptr, len, prot, flags, fd, 0);
236 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
241 read(fd, buf, len);
253 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
267 size_t len = PAGE_SIZE; variable
280 int wByte = write(fd, buf, len);
283 char *mem = (char *)mmap(nullptr, len, prot, flags, fd, 0);
286 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
298 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
304 read(fd, buf, len);
324 size_t len = PAGE_SIZE; variable
339 char *mem = (char *)mmap(nullptr, len, prot, flags, fd, 0);
342 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
353 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
367 size_t len = PAGE_SIZE; variable
379 int wByte = write(fd, buf, len);
382 char *mem = (char *)mmap(nullptr, len, prot, flags, fd, 0);
385 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
398 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
412 size_t len = PAGE_SIZE; variable
427 char *mem = (char *)mmap(nullptr, len, prot, flags, fd, 0);
430 EXPECT_TRUE(mprotect(mem, len, mprot) == 0) << "ERROR: mprotect() != 0";
442 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
457 size_t len = PAGE_SIZE; variable
463 mem = mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
467 int ret = mprotect(mem, len, PROT_WRITE);
471 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";
484 size_t len = PAGE_SIZE; variable
486 void *mem = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
491 int ret = mprotect((void *)invalueAddr, len, PROT_WRITE);
495 ret = mprotect((void *)nullptr, len, PROT_WRITE);
499 EXPECT_TRUE(munmap(mem, len) == 0) << "ERROR: munmap() != 0";