Lines Matching refs:M2
76 bool doesOverlap(MemoryBlock M1, MemoryBlock M2) { in doesOverlap() argument
77 if (M1.base() == M2.base()) in doesOverlap()
80 if (M1.base() > M2.base()) in doesOverlap()
81 return (unsigned char *)M2.base() + M2.allocatedSize() > M1.base(); in doesOverlap()
83 return (unsigned char *)M1.base() + M1.allocatedSize() > M2.base(); in doesOverlap()
131 MemoryBlock M2 = Memory::allocateMappedMemory(64, nullptr, Flags, EC); in TEST_P() local
138 EXPECT_NE((void*)nullptr, M2.base()); in TEST_P()
139 EXPECT_LE(64U, M2.allocatedSize()); in TEST_P()
143 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
144 EXPECT_FALSE(doesOverlap(M2, M3)); in TEST_P()
154 EXPECT_FALSE(Memory::releaseMappedMemory(M2)); in TEST_P()
189 MemoryBlock M2 = Memory::allocateMappedMemory(8 * sizeof(int), nullptr, Flags, in TEST_P() local
196 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
197 EXPECT_FALSE(doesOverlap(M2, M3)); in TEST_P()
202 EXPECT_NE((void*)nullptr, M2.base()); in TEST_P()
203 EXPECT_LE(8U * sizeof(int), M2.allocatedSize()); in TEST_P()
210 int *y = (int*)M2.base(); in TEST_P()
239 EXPECT_FALSE(Memory::releaseMappedMemory(M2)); in TEST_P()
252 MemoryBlock M2 = Memory::allocateMappedMemory(8 * sizeof(int), nullptr, Flags, in TEST_P() local
261 EXPECT_NE((void*)nullptr, M2.base()); in TEST_P()
262 EXPECT_LE(8U * sizeof(int), M2.allocatedSize()); in TEST_P()
267 EXPECT_FALSE(Memory::protectMappedMemory(M2, getTestableEquivalent(Flags))); in TEST_P()
270 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
271 EXPECT_FALSE(doesOverlap(M2, M3)); in TEST_P()
276 int *y = (int*)M2.base(); in TEST_P()
301 EXPECT_FALSE(Memory::releaseMappedMemory(M2)); in TEST_P()
309 MemoryBlock M2 = Memory::allocateMappedMemory(64, &M1, Flags, EC); in TEST_P() local
311 MemoryBlock M3 = Memory::allocateMappedMemory(32, &M2, Flags, EC); in TEST_P()
316 EXPECT_NE((void*)nullptr, M2.base()); in TEST_P()
317 EXPECT_LE(64U, M2.allocatedSize()); in TEST_P()
321 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
322 EXPECT_FALSE(doesOverlap(M2, M3)); in TEST_P()
327 EXPECT_FALSE(Memory::releaseMappedMemory(M2)); in TEST_P()
336 MemoryBlock M2 = Memory::allocateMappedMemory(64, &Near, Flags, EC); in TEST_P() local
343 EXPECT_NE((void*)nullptr, M2.base()); in TEST_P()
344 EXPECT_LE(64U, M2.allocatedSize()); in TEST_P()
350 EXPECT_FALSE(Memory::releaseMappedMemory(M2)); in TEST_P()
359 MemoryBlock M2 = Memory::allocateMappedMemory(64, &Near, Flags, EC); in TEST_P() local
366 EXPECT_NE((void*)nullptr, M2.base()); in TEST_P()
367 EXPECT_LE(64U, M2.allocatedSize()); in TEST_P()
371 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
372 EXPECT_FALSE(doesOverlap(M2, M3)); in TEST_P()
377 EXPECT_FALSE(Memory::releaseMappedMemory(M2)); in TEST_P()
386 MemoryBlock M2 = Memory::allocateMappedMemory(64, &Near, Flags, EC); in TEST_P() local
393 EXPECT_NE((void*)nullptr, M2.base()); in TEST_P()
394 EXPECT_LE(64U, M2.allocatedSize()); in TEST_P()
398 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
399 EXPECT_FALSE(doesOverlap(M2, M3)); in TEST_P()
404 EXPECT_FALSE(Memory::releaseMappedMemory(M2)); in TEST_P()