Memory occupied by ArrayList

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

My program fills an arraylist with custom objects. I would like to know at
runtime the amount of memory this arraylist occupies. Is it as easy as using
the SizeOf() method or do I have to do something else?

Thanks
Macca
 
Macca,

Short of using a debugging interface for the runtime, you aren't going
to be able to figure this out.

What are you going to use it for?
 
Hi Nicholas,

I just want to see how many custom objects will occupy a certain amount of
memory. e.g how many of them occupy 512Mb.

Thanks
Macca

Nicholas Paldino said:
Macca,

Short of using a debugging interface for the runtime, you aren't going
to be able to figure this out.

What are you going to use it for?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Macca said:
Hi,

My program fills an arraylist with custom objects. I would like to know at
runtime the amount of memory this arraylist occupies. Is it as easy as
using
the SizeOf() method or do I have to do something else?

Thanks
Macca
 
Back
Top