Lines Matching defs:M1
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();
61 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags,EC);
64 EXPECT_NE((void*)nullptr, M1.base());
65 EXPECT_LE(sizeof(int), M1.size());
67 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
72 MemoryBlock M1 = Memory::allocateMappedMemory(16, nullptr, Flags, EC);
79 EXPECT_NE((void*)nullptr, M1.base());
80 EXPECT_LE(16U, M1.size());
86 EXPECT_FALSE(doesOverlap(M1, M2));
88 EXPECT_FALSE(doesOverlap(M1, M3));
90 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
107 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags,EC);
110 EXPECT_NE((void*)nullptr, M1.base());
111 EXPECT_LE(sizeof(int), M1.size());
113 int *a = (int*)M1.base();
117 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
126 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags,
136 EXPECT_FALSE(doesOverlap(M1, M2));
138 EXPECT_FALSE(doesOverlap(M1, M3));
140 EXPECT_NE((void*)nullptr, M1.base());
141 EXPECT_LE(1U * sizeof(int), M1.size());
147 int *x = (int*)M1.base();
162 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
184 MemoryBlock M1 = Memory::allocateMappedMemory(2 * sizeof(int), nullptr, Flags,
194 EXPECT_NE((void*)nullptr, M1.base());
195 EXPECT_LE(2U * sizeof(int), M1.size());
201 EXPECT_FALSE(Memory::protectMappedMemory(M1, getTestableEquivalent(Flags)));
205 EXPECT_FALSE(doesOverlap(M1, M2));
207 EXPECT_FALSE(doesOverlap(M1, M3));
209 int *x = (int*)M1.base();
222 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
241 MemoryBlock M1 = Memory::allocateMappedMemory(16, nullptr, Flags, EC);
243 MemoryBlock M2 = Memory::allocateMappedMemory(64, &M1, Flags, EC);
248 EXPECT_NE((void*)nullptr, M1.base());
249 EXPECT_LE(16U, M1.size());
255 EXPECT_FALSE(doesOverlap(M1, M2));
257 EXPECT_FALSE(doesOverlap(M1, M3));
259 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
267 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC);
274 EXPECT_NE((void*)nullptr, M1.base());
275 EXPECT_LE(16U, M1.size());
281 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
289 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC);
296 EXPECT_NE((void*)nullptr, M1.base());
297 EXPECT_LE(16U, M1.size());
303 EXPECT_FALSE(doesOverlap(M1, M2));
305 EXPECT_FALSE(doesOverlap(M1, M3));
307 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
315 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC);
322 EXPECT_NE((void*)nullptr, M1.base());
323 EXPECT_LE(16U, M1.size());
329 EXPECT_FALSE(doesOverlap(M1, M2));
331 EXPECT_FALSE(doesOverlap(M1, M3));
333 EXPECT_FALSE(Memory::releaseMappedMemory(M1));
341 MemoryBlock M1 = Memory::allocateMappedMemory(15, &Near, Flags, EC);
344 EXPECT_NE((void*)nullptr, M1.base());
345 EXPECT_LE(sizeof(int), M1.size());
347 EXPECT_FALSE(Memory::releaseMappedMemory(M1));