If nothing else, you're creating 100 threads. Each thread requires 1 Meg of
stack space from your Working Set. That's 100 Megs already.
--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins
"Joe K" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Okay, then I can't explain it. Go ahead and try it though. The below
> code
> in .Net 1.1 reports 7MB for private bytes, but 111MB in 2.0.
>
> namespace TestService
> {
> public partial class Service1 : ServiceBase
> {
> public Service1()
> {
> InitializeComponent();
> }
>
> protected override void OnStart(string[] args)
> {
> for (int i = 0; i < 100; i++)
> {
> Thread thread = new Thread(Service1.Run);
> thread.Start();
> }
> }
>
> protected override void OnStop()
> {
> // TODO: Add code here to perform any tear-down necessary to
> stop your service.
> }
>
> protected static void Run()
> {
> while (true)
> {
> Thread.Sleep(1000*10);
> }
> }
> }
> }
>
>
>
>