Lines Matching defs:page_size
62 const int page_size = GetPageSize();
63 uptr mem = (uptr)mmap(0, 3 * page_size, PROT_READ | PROT_WRITE,
66 mprotect((void *)(mem + page_size), page_size, PROT_NONE);
67 EXPECT_TRUE(IsAccessibleMemoryRange(mem, page_size - 1));
68 EXPECT_TRUE(IsAccessibleMemoryRange(mem, page_size));
69 EXPECT_FALSE(IsAccessibleMemoryRange(mem, page_size + 1));
70 EXPECT_TRUE(IsAccessibleMemoryRange(mem + page_size - 1, 1));
71 EXPECT_FALSE(IsAccessibleMemoryRange(mem + page_size - 1, 2));
72 EXPECT_FALSE(IsAccessibleMemoryRange(mem + 2 * page_size - 1, 1));
73 EXPECT_TRUE(IsAccessibleMemoryRange(mem + 2 * page_size, page_size));
74 EXPECT_FALSE(IsAccessibleMemoryRange(mem, 3 * page_size));