| 1 |
import core.memory; |
| 2 |
void main() |
| 3 |
{ |
| 4 |
auto collections = GC.profileStats().numCollections; |
| 5 |
// loop until we trigger a collection |
| 6 |
for (;;) |
| 7 |
{ |
| 8 |
cast(void)GC.malloc(100_000, GC.BlkAttr.NO_SCAN); |
| 9 |
if (GC.profileStats().numCollections == collections+1) |
| 10 |
break; |
| 11 |
} |
| 12 |
} |