Lines Matching refs:MB
132 std::unique_ptr<Space> space(create_space("test", 16 * MB, 32 * MB, 32 * MB, nullptr));
137 std::unique_ptr<Space> space(create_space("test", 16 * MB, 16 * MB, 16 * MB, nullptr));
142 std::unique_ptr<Space> space(create_space("test", 32 * MB, 16 * MB, 16 * MB, nullptr));
147 std::unique_ptr<Space> space(create_space("test", 16 * MB, 16 * MB, 32 * MB, nullptr));
152 std::unique_ptr<Space> space(create_space("test", 16 * MB, 8 * MB, 32 * MB, nullptr));
157 std::unique_ptr<Space> space(create_space("test", 8 * MB, 16 * MB, 32 * MB, nullptr));
162 std::unique_ptr<Space> space(create_space("test", 8 * MB, 32 * MB, 16 * MB, nullptr));
173 MallocSpace* space(create_space("test", 4 * MB, 16 * MB, 16 * MB, nullptr));
185 hs.NewHandle(Alloc(space, self, 1 * MB, &ptr1_bytes_allocated, &ptr1_usable_size)));
187 EXPECT_LE(1U * MB, ptr1_bytes_allocated);
188 EXPECT_LE(1U * MB, ptr1_usable_size);
192 mirror::Object* ptr2 = Alloc(space, self, 8 * MB, &dummy, nullptr);
198 hs.NewHandle(AllocWithGrowth(space, self, 8 * MB, &ptr3_bytes_allocated, &ptr3_usable_size)));
200 EXPECT_LE(8U * MB, ptr3_bytes_allocated);
201 EXPECT_LE(8U * MB, ptr3_usable_size);
205 mirror::Object* ptr4 = space->Alloc(self, 8 * MB, &dummy, nullptr);
209 mirror::Object* ptr5 = space->AllocWithGrowth(self, 8 * MB, &dummy, nullptr);
216 EXPECT_LE(8U * MB, free3);
221 hs.NewHandle(AllocWithGrowth(space, self, 9 * MB, &ptr6_bytes_allocated, &ptr6_usable_size)));
223 EXPECT_LE(9U * MB, ptr6_bytes_allocated);
224 EXPECT_LE(9U * MB, ptr6_usable_size);
230 EXPECT_LE(1U * MB, free1);
233 EXPECT_TRUE(space->Alloc(self, 1U * MB, &dummy, nullptr) != nullptr);
250 ptr1.Assign(Alloc(space, self, 1 * MB, &ptr1_bytes_allocated, &ptr1_usable_size));
252 EXPECT_LE(1U * MB, ptr1_bytes_allocated);
253 EXPECT_LE(1U * MB, ptr1_usable_size);
257 ptr2 = Alloc(space, self, 8 * MB, &dummy, nullptr);
261 ptr3.Assign(AllocWithGrowth(space, self, 2 * MB, &ptr3_bytes_allocated, &ptr3_usable_size));
263 EXPECT_LE(2U * MB, ptr3_bytes_allocated);
264 EXPECT_LE(2U * MB, ptr3_usable_size);
271 EXPECT_LE(1U * MB, free1);
276 MallocSpace* space(create_space("test", 4 * MB, 16 * MB, 16 * MB, nullptr));
288 hs.NewHandle(Alloc(space, self, 1 * MB, &ptr1_bytes_allocated, &ptr1_usable_size)));
290 EXPECT_LE(1U * MB, ptr1_bytes_allocated);
291 EXPECT_LE(1U * MB, ptr1_usable_size);
295 mirror::Object* ptr2 = Alloc(space, self, 8 * MB, &dummy, nullptr);
301 hs.NewHandle(AllocWithGrowth(space, self, 8 * MB, &ptr3_bytes_allocated, &ptr3_usable_size)));
303 EXPECT_LE(8U * MB, ptr3_bytes_allocated);
304 EXPECT_LE(8U * MB, ptr3_usable_size);
308 mirror::Object* ptr4 = Alloc(space, self, 8 * MB, &dummy, nullptr);
312 mirror::Object* ptr5 = AllocWithGrowth(space, self, 8 * MB, &dummy, nullptr);
319 EXPECT_LE(8U * MB, free3);
324 hs.NewHandle(AllocWithGrowth(space, self, 9 * MB, &ptr6_bytes_allocated, &ptr6_usable_size)));
326 EXPECT_LE(9U * MB, ptr6_bytes_allocated);
327 EXPECT_LE(9U * MB, ptr6_usable_size);
333 EXPECT_LE(1U * MB, free1);
337 MallocSpace* space(create_space("test", 4 * MB, 16 * MB, 16 * MB, nullptr));
547 size_t initial_size = 4 * MB;
548 size_t growth_limit = 8 * MB;
549 size_t capacity = 16 * MB;
609 TEST_SizeFootPrintGrowthLimitAndTrimStatic(1MB, spaceName, spaceFn, 1 * MB) \
610 TEST_SizeFootPrintGrowthLimitAndTrimStatic(4MB, spaceName, spaceFn, 4 * MB) \
611 TEST_SizeFootPrintGrowthLimitAndTrimStatic(8MB, spaceName, spaceFn, 8 * MB)
624 TEST_SizeFootPrintGrowthLimitAndTrimRandom(1MB, spaceName, spaceFn, 1 * MB) \
625 TEST_SizeFootPrintGrowthLimitAndTrimRandom(4MB, spaceName, spaceFn, 4 * MB) \
626 TEST_SizeFootPrintGrowthLimitAndTrimRandom(8MB, spaceName, spaceFn, 8 * MB)