Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / samples / size / README
1
2 * Size sample
3
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.
7
8         This is exposed in the method:
9
10         int Mono.ObjectServices.ObjectInspector.GetMemoryUsage (object x)
11
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). 
15         
16 * Inner Details.
17
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).
21
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.
25         
26
27         
28