Lines Matching refs:memory2
94 SharedMemory memory2(handle, false);
95 EXPECT_TRUE(memory2.Map(kDataSize));
96 volatile int* const ptr = static_cast<int*>(memory2.memory());
99 memory2.Lock();
104 memory2.Unlock();
107 memory2.Close();
136 SharedMemory memory2;
137 rv = memory2.Open(test_name, false);
139 rv = memory2.Map(kDataSize);
141 EXPECT_NE(memory1.memory(), memory2.memory()); // Compare the pointers.
145 ASSERT_NE(memory2.memory(), static_cast<void*>(NULL));
149 EXPECT_EQ(memcmp(memory1.memory(), memory2.memory(), kDataSize), 0);
153 char *start_ptr = static_cast<char *>(memory2.memory());
159 memory2.Close();
163 rv = memory2.Delete(test_name);
189 SharedMemory memory2;
191 rv = memory2.CreateNamed(test_name, false, kDataSize2);
195 rv = memory2.CreateNamed(test_name, true, kDataSize2);
198 // Memory2 shouldn't know the size because we didn't create it.
199 EXPECT_EQ(memory2.created_size(), 0U);
202 rv = memory2.Map(kDataSize);
205 // Verify that opening memory2 didn't truncate or delete memory 1.
206 char *start_ptr = static_cast<char *>(memory2.memory());
213 memory2.Close();