Skip to content

Instantly share code, notes, and snippets.

@kumpera
Created July 29, 2014 22:31
Show Gist options
  • Save kumpera/cfc0da5f57a3f975cca4 to your computer and use it in GitHub Desktop.
Save kumpera/cfc0da5f57a3f975cca4 to your computer and use it in GitHub Desktop.
using System;
using System.Threading;
class T
{
static int threads = 4;
static void thread_start()
{
for (int i = 0; i < 200 * 1000 * 1000; ++i) {
new object ();
}
}
static int Main(string[] args)
{
var t = new Thread [threads];
for (int i = 0; i < threads; ++i) t[i] = new Thread (thread_start);
for (int i = 0; i < threads; ++i) t[i].Start ();
for (int i = 0; i < threads; ++i) t[i].Join ();
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment