Lines Matching full:m1
45 bool doesOverlap(MemoryBlock M1, MemoryBlock M2) { in doesOverlap() argument
46 if (M1.base() == M2.base()) in doesOverlap()
49 if (M1.base() > M2.base()) in doesOverlap()
50 return (unsigned char *)M2.base() + M2.size() > M1.base(); in doesOverlap()
52 return (unsigned char *)M1.base() + M1.size() > M2.base(); in doesOverlap()
61 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags,EC); in TEST_P() local
64 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
65 EXPECT_LE(sizeof(int), M1.size()); in TEST_P()
67 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
72 MemoryBlock M1 = Memory::allocateMappedMemory(16, nullptr, Flags, EC); in TEST_P() local
79 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
80 EXPECT_LE(16U, M1.size()); in TEST_P()
86 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
88 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
90 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
107 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags,EC); in TEST_P() local
110 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
111 EXPECT_LE(sizeof(int), M1.size()); in TEST_P()
113 int *a = (int*)M1.base(); in TEST_P()
117 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
126 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags, in TEST_P() local
136 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
138 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
140 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
141 EXPECT_LE(1U * sizeof(int), M1.size()); in TEST_P()
147 int *x = (int*)M1.base(); in TEST_P()
162 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
184 MemoryBlock M1 = Memory::allocateMappedMemory(2 * sizeof(int), nullptr, Flags, in TEST_P() local
194 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
195 EXPECT_LE(2U * sizeof(int), M1.size()); in TEST_P()
201 EXPECT_FALSE(Memory::protectMappedMemory(M1, getTestableEquivalent(Flags))); in TEST_P()
205 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
207 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
209 int *x = (int*)M1.base(); in TEST_P()
222 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
241 MemoryBlock M1 = Memory::allocateMappedMemory(16, nullptr, Flags, EC); in TEST_P() local
243 MemoryBlock M2 = Memory::allocateMappedMemory(64, &M1, Flags, EC); in TEST_P()
248 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
249 EXPECT_LE(16U, M1.size()); in TEST_P()
255 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
257 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
259 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
267 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC); in TEST_P() local
274 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
275 EXPECT_LE(16U, M1.size()); in TEST_P()
281 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
289 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC); in TEST_P() local
296 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
297 EXPECT_LE(16U, M1.size()); in TEST_P()
303 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
305 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
307 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
315 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC); in TEST_P() local
322 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
323 EXPECT_LE(16U, M1.size()); in TEST_P()
329 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
331 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
333 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
341 MemoryBlock M1 = Memory::allocateMappedMemory(15, &Near, Flags, EC); in TEST_P() local
344 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
345 EXPECT_LE(sizeof(int), M1.size()); in TEST_P()
347 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()