1. If you are talking about "static Object foo = new Foo()" in C#, Foo is allocated in GC heap.
2. It depends on what you mean by VM internal objects. The managed VM internal objects are allocated in GC heap, the unmanaged ones are not. For example thread: There are two different objects representing thread - the managed one in clr\src\bcl\system\threading\thread.cs, and the unmanaged one in clr\src\vm\thread.h. One has pointer to the other. 3. There are two way to represent weak references: System.WeakReference and System.Runtime.InteropServices.GCHandle. The first one is always allocated in GC heap since it is class in C#, the second one may not be allocated in GC heap since it is struct in C# - it could be allocated on stack. There is nothing special about weak references to delegates. 4. ObjectAllocated callback should be called for all objects allocated on GCHeap. -Jan -----Original Message----- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of SUBSCRIBE DOTNET-ROTOR Memomana Sent: Thursday, March 25, 2004 6:42 PM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] Allocation Questions I have questions regarding allocations in the GC heap. I really hope someone could help me on these. #1 Are static objects allocated in the GC heap? #2 Are VM internal objects allocated in the GC heap? #3 Are weak references to delegates allocated in the GC heap? #4 Does ObjectAllocated callback method (in the Profiling API) notify static object allocations? VM internal object allocations? Weak reference allocations? Thank you beforehand. Memomana =================================== This list is hosted by DevelopMentor(r) http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com ASP.NET courses you may be interested in: Guerrilla ASP.NET 15 March 2004, in Boston, MA 17 May 2004 in Torrance, CA 7 June 2004, London, UK http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com