mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
12 lines
300 B
D
12 lines
300 B
D
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;
|
|
}
|
|
}
|