4 This sample provides a new internal call that can be used to
5 obtain the size of an object and all of the referenced objects
6 that this object holds.
8 This is exposed in the method:
10 int Mono.ObjectServices.ObjectInspector.GetMemoryUsage (object x)
12 Available in the objectinspector.dll file; To use this, you
13 must run Mono with the --profile=size argument (and have the
14 libmono-profile-size.so module in your path).
18 This implementation used a profiler hook at jit-end to install
19 a new internal call, and exposes a small DLL
20 (objectinspector.dll).
22 There is no need to use the profiler, the method body that
23 does the object size computation can be copy/pasted elsewhere,
24 particularly on embedded uses of Mono.