File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
examples_tests/10.AllocatorTest Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -168,23 +168,20 @@ class AllocatorHandler
168
168
if (results.size () == 0u )
169
169
return ;
170
170
171
- outAddresses.clear ();
172
- sizes.clear ();
173
- alignments.clear ();
174
-
175
171
// randomly decide how many calls to `multi_free`
176
172
const uint32_t multiFreeCnt = rng.getRandomNumber (1u , results.size ());
177
173
178
- // TODO:
179
- // shuffle results
180
-
181
174
if (std::is_same<AlctrType, core::GeneralpurposeAddressAllocator<uint32_t >>::value)
182
175
{
183
176
std::shuffle (results.begin (), results.end (), rng.getMt ());
184
177
}
185
178
186
179
for (uint32_t i = 0u ; (i < multiFreeCnt) && results.size (); i++)
187
180
{
181
+ outAddresses.clear ();
182
+ sizes.clear ();
183
+ alignments.clear ();
184
+
188
185
// randomly how many addresses we should deallocate (but obvs less than all allocated) NOTE: must pick number less than `traits::max_multi_free`
189
186
const uint32_t addressesToFreeUpperBound = min (Traits::maxMultiOps, results.size ());
190
187
const uint32_t addressesToFreeCnt = rng.getRandomNumber (0u , addressesToFreeUpperBound);
You can’t perform that action at this time.
0 commit comments