I'm not sure if it's a problem with array where the combined size is over 8
megs, or if it's any object over 8 megs. As for why you haven't seen a
problem, I'm not sure, I've only seen it replicated in with arrays. I would
guess that strings are handled differently they other objects (including
arrays) for performance reasons.

Erick

----- Original Message -----
From: "franklin gray" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 22, 2002 2:52 PM
Subject: Re: [DOTNET] Large object memory leak - workaround?


It sounds that the problem is with arrays that combined size is larger then
8 meg and not a single object larger then 8 meg, correct?

I do a lot of xmldocument creation with strings over 8 meg and I haven't
seem a problem yet.

-----Original Message-----
From: Erick Thompson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 4:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Large object memory leak - workaround?


I'm fairly sure I'm leaking. I call

GC.Collect();

GC.WaitForPendingFinalizers();


in very often just to make sure, and I've combed through my code making sure
I explicitly dispose of everything disposable. The problem occurs in a
function where I am creating and using large arrays (> 8 megs). I had a
problem with the program quitting with an out of memory exception, and the
perfmon .net memory counters (large object heap size & all generations
counters) showed that I was using > 256 megs of memory (right after the GC
calls). I understand that memory reclaimed by the GC might not be returned
to Windows, but my problem sounds exactly like a MS acknowledged bug[1] (and
one I believe that someone on this list initially found).

Thanks,
Erick

[1]
http://discuss.develop.com/archives/wa.exe?A2=ind0202A&L=DOTNET&D=0&P=14080

----- Original Message -----
From: "Murphy, James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 22, 2002 12:23 PM
Subject: Re: [DOTNET] Large object memory leak - workaround?


> Objects that large are allocated from the Large Object heap and placed
> directly into generation 2 so they are not collected very often.  Are you
> sure you're leaking?  how can you tell.  I'd suggest using the perform
> counters - ".NET CLR Memory" if you haven't already.  Watch the # Gen 2
> collections and the Large Object Heap Size counter.
>
> Good luck
> Jim
>
> > -----Original Message-----
> > From: Erick Thompson [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 22, 2002 3:10 PM
> > To: [EMAIL PROTECTED]
> > Subject: [DOTNET] Large object memory leak - workaround?
> >
> >
> > I've run across the large object memory leak/bug, where
> > objects larger then
> > 8 megs aren't getting freed. However, I can't find a
> > workaround (aside from
> > only using smaller objects :) Does anyone know how to work around this
> > issue?
> >
> > Thanks,
> > Erick
> >
> > You can read messages from the DOTNET archive, unsubscribe
> > from DOTNET, or
> > subscribe to other DevelopMentor lists at http://discuss.develop.com.
> >
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to