aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite/libphobos.gc/issue22843.d
blob: bf6e830f59807a6fd89561b67a2a1d6dd3786ee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import core.memory;
void main()
{
    auto collections = GC.profileStats().numCollections;
    // loop until we trigger a collection
    for (;;)
    {
        cast(void)GC.malloc(100_000, GC.BlkAttr.NO_SCAN);
        if (GC.profileStats().numCollections == collections+1)
            break;
    }
}