Lines Matching refs:M1
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()
101 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags,EC); in TEST_P() local
104 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
105 EXPECT_LE(sizeof(int), M1.allocatedSize()); in TEST_P()
107 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
113 MemoryBlock M1 = Memory::allocateMappedMemory( in TEST_P() local
120 EXPECT_NE((void *)nullptr, M1.base()); in TEST_P()
121 EXPECT_LE(sizeof(int), M1.allocatedSize()); in TEST_P()
123 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
129 MemoryBlock M1 = Memory::allocateMappedMemory(16, nullptr, Flags, EC); in TEST_P() local
136 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
137 EXPECT_LE(16U, M1.allocatedSize()); in TEST_P()
143 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
145 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
147 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
165 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags,EC); in TEST_P() local
168 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
169 EXPECT_LE(sizeof(int), M1.allocatedSize()); in TEST_P()
171 int *a = (int*)M1.base(); in TEST_P()
175 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
186 MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), nullptr, Flags, in TEST_P() local
196 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
198 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
200 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
201 EXPECT_LE(1U * sizeof(int), M1.allocatedSize()); in TEST_P()
207 int *x = (int*)M1.base(); in TEST_P()
222 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
249 MemoryBlock M1 = Memory::allocateMappedMemory(2 * sizeof(int), nullptr, Flags, in TEST_P() local
259 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
260 EXPECT_LE(2U * sizeof(int), M1.allocatedSize()); in TEST_P()
266 EXPECT_FALSE(Memory::protectMappedMemory(M1, getTestableEquivalent(Flags))); in TEST_P()
270 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
272 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
274 int *x = (int*)M1.base(); in TEST_P()
287 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
307 MemoryBlock M1 = Memory::allocateMappedMemory(16, nullptr, Flags, EC); in TEST_P() local
309 MemoryBlock M2 = Memory::allocateMappedMemory(64, &M1, Flags, EC); in TEST_P()
314 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
315 EXPECT_LE(16U, M1.allocatedSize()); in TEST_P()
321 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
323 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
325 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
334 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC); in TEST_P() local
341 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
342 EXPECT_LE(16U, M1.allocatedSize()); in TEST_P()
348 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
357 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC); in TEST_P() local
364 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
365 EXPECT_LE(16U, M1.allocatedSize()); in TEST_P()
371 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
373 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
375 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
384 MemoryBlock M1 = Memory::allocateMappedMemory(16, &Near, Flags, EC); in TEST_P() local
391 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
392 EXPECT_LE(16U, M1.allocatedSize()); in TEST_P()
398 EXPECT_FALSE(doesOverlap(M1, M2)); in TEST_P()
400 EXPECT_FALSE(doesOverlap(M1, M3)); in TEST_P()
402 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()
411 MemoryBlock M1 = Memory::allocateMappedMemory(15, &Near, Flags, EC); in TEST_P() local
414 EXPECT_NE((void*)nullptr, M1.base()); in TEST_P()
415 EXPECT_LE(sizeof(int), M1.allocatedSize()); in TEST_P()
417 EXPECT_FALSE(Memory::releaseMappedMemory(M1)); in TEST_P()