]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/scudo/quarantine.cpp
1 // RUN: %clang_scudo %s -o %t
2 // RUN: SCUDO_OPTIONS=QuarantineSizeMb=1 %run %t 2>&1
4 // Tests that the quarantine prevents a chunk from being reused right away.
5 // Also tests that a chunk will eventually become available again for
6 // allocation when the recycling criteria has been met.
12 int main(int argc
, char **argv
)
15 size_t size
= 1U << 16;
17 // The delayed freelist will prevent a chunk from being available right away
30 // Eventually the chunk should become available again
32 for (int i
= 0; i
< 0x100 && found
== false; i
++) {