Size of object in at runtime memory
From: Rune Andersen (rune135_at_REMOVEpop.k-net.dk)
Date: 03/19/04
- Next message: jonny: "Network Discovery tool"
- Previous message: Reinhold Schalk: "Re: OOP/Design Question"
- Next in thread: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Size of object in at runtime memory"
- Reply: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Size of object in at runtime memory"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Mar 2004 13:23:14 +0100
Hi....
I'm working on a cache controller and needs to know the current size of the
cache object, but how do I get that ?
I've got an ArrayList populated with structs and now I want to know the
current memory usage of the ArrayList at runtime.
I've tried using
System.Runtime.InteropServices.Marshal.SizeOf( object structure );
but it seems like it's only working on types like int, long, double etc.
Is there any method I can use that gives me the size of memory used by a
specified object ?
/Rune
- Next message: jonny: "Network Discovery tool"
- Previous message: Reinhold Schalk: "Re: OOP/Design Question"
- Next in thread: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Size of object in at runtime memory"
- Reply: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Size of object in at runtime memory"
- Messages sorted by: [ date ] [ thread ]