Home | History | Annotate | Download | only in Support

Lines Matching refs:M2

45   bool doesOverlap(MemoryBlock M1, MemoryBlock M2) {
46 if (M1.base() == M2.base())
49 if (M1.base() > M2.base())
50 return (unsigned char *)M2.base() + M2.size() > M1.base();
52 return (unsigned char *)M1.base() + M1.size() > M2.base();
74 MemoryBlock M2 = Memory::allocateMappedMemory(64, nullptr, Flags, EC);
81 EXPECT_NE((void*)nullptr, M2.base());
82 EXPECT_LE(64U, M2.size());
86 EXPECT_FALSE(doesOverlap(M1, M2));
87 EXPECT_FALSE(doesOverlap(M2, M3));
97 EXPECT_FALSE(Memory::releaseMappedMemory(M2));
129 MemoryBlock M2 = Memory::allocateMappedMemory(8 * sizeof(int), nullptr, Flags,
136 EXPECT_FALSE(doesOverlap(M1, M2));
137 EXPECT_FALSE(doesOverlap(M2, M3));
142 EXPECT_NE((void*)nullptr, M2.base());
143 EXPECT_LE(8U * sizeof(int), M2.size());
150 int *y = (int*)M2.base();
175 // Verify that M2 remains unaffected by other activity
179 EXPECT_FALSE(Memory::releaseMappedMemory(M2));
187 MemoryBlock M2 = Memory::allocateMappedMemory(8 * sizeof(int), nullptr, Flags,
196 EXPECT_NE((void*)nullptr, M2.base());
197 EXPECT_LE(8U * sizeof(int), M2.size());
202 EXPECT_FALSE(Memory::protectMappedMemory(M2, getTestableEquivalent(Flags)));
205 EXPECT_FALSE(doesOverlap(M1, M2));
206 EXPECT_FALSE(doesOverlap(M2, M3));
211 int *y = (int*)M2.base();
236 EXPECT_FALSE(Memory::releaseMappedMemory(M2));
243 MemoryBlock M2 = Memory::allocateMappedMemory(64, &M1, Flags, EC);
245 MemoryBlock M3 = Memory::allocateMappedMemory(32, &M2, Flags, EC);
250 EXPECT_NE((void*)nullptr, M2.base());
251 EXPECT_LE(64U, M2.size());
255 EXPECT_FALSE(doesOverlap(M1, M2));
256 EXPECT_FALSE(doesOverlap(M2, M3));
261 EXPECT_FALSE(Memory::releaseMappedMemory(M2));
269 MemoryBlock M2 = Memory::allocateMappedMemory(64, &Near, Flags, EC);
276 EXPECT_NE((void*)nullptr, M2.base());
277 EXPECT_LE(64U, M2.size());
283 EXPECT_FALSE(Memory::releaseMappedMemory(M2));
291 MemoryBlock M2 = Memory::allocateMappedMemory(64, &Near, Flags, EC);
298 EXPECT_NE((void*)nullptr, M2.base());
299 EXPECT_LE(64U, M2.size());
303 EXPECT_FALSE(doesOverlap(M1, M2));
304 EXPECT_FALSE(doesOverlap(M2, M3));
309 EXPECT_FALSE(Memory::releaseMappedMemory(M2));
317 MemoryBlock M2 = Memory::allocateMappedMemory(64, &Near, Flags, EC);
324 EXPECT_NE((void*)nullptr, M2.base());
325 EXPECT_LE(64U, M2.size());
329 EXPECT_FALSE(doesOverlap(M1, M2));
330 EXPECT_FALSE(doesOverlap(M2, M3));
335 EXPECT_FALSE(Memory::releaseMappedMemory(M2));