| 746 | : VerifyApplication::Test("os_shrink_test",ISA,VerifyApplication::TEST_SHOULD_PASS,false) {} |
| 747 | |
| 748 | VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent) |
| 749 | { |
| 750 | std::vector<std::unique_ptr<Allocation>> allocations; |
| 751 | allocations.reserve(1024*1024); |
| 752 | for (size_t i=0; i<1024*1024; i++) |
| 753 | { |
| 754 | std::unique_ptr<Allocation> alloc(new Allocation(2*4096)); |
| 755 | if (allocations.size() > 1) allocations.back()->shrink(); |
| 756 | allocations.push_back(std::move(alloc)); |
| 757 | |
| 758 | } |
| 759 | allocations.clear(); |
| 760 | return VerifyApplication::PASSED; |
| 761 | } |
| 762 | }; |
| 763 | |
| 764 | struct MultipleDevicesTest : public VerifyApplication::Test |