Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / November 2003

Tip: Looking for answers? Try searching our database.

Interface Maps

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben Rush - 21 Nov 2003 18:53 GMT
   This is a bit of longshot because I'm sure not a lot of people know the
major details of this, but I was wondering if anyone out there might be able
to help me in my understanding of interface maps in the runtime.

   I'm learning about how classes get loaded into memory in the runtime,
specifically how the EEClass and its associated MethodTable structures get
built at runtime via the analysis of metadata by the ClassLoader. I was
going along pretty nicely until I stumbled across the insanity that is the
Interface Map, and how its used. I'm not sure if I'm being particulary
stupid with this, or if the documentation is poor, if it's just incredibly
complex, but I have the following questions -

   1) Per Application Domain there exists a single Interface Map, yes?

   2) Every interface type that is loaded into the application domain gets
an entry in this Interface Map, right?

   3) When an EEClass is being built by the ClassLoader, the corresponding
MethodTable has a VTABLE slot at its tail end that is arranged in such a
manner that Inherited Virtuals, Introduced Virtuals and Instance and Static
Methods are neatly arranged for easier lookup.

   ==Warning, this is where my understanding breaks down ==

   4) The ClassLoader, after having loaded all of the types of the
interfaces into an array before calling the BuildMethodTable function of
EEClass, uses this information, along with the address of the single
Interface Map in the application domain, to locate the entry for each and
every Interface Type in the Interface Map that is being implemented in
current class being loaded.

   5) Each entry in the Interface Map is a structure that contains a
pointer to the Interface type's MethodTable and the offset for the interface
functions for that type. And then with the knowledge of the number of
functions and their layout in the Interface type, the functions are laid out
by the ClassLoader in the same order within the type's VTABLE as the
Interface type's VTABLE.

   6) Calls to methods are then realized through the newly constructed
type's VTABLE, the JIT compilation takes place and so forth....

   I know that the ClassLoader has to somehow use this information to map
out what functions are placed where in the VTABLE slots in its MethodTable,
but I'm not sure how this is done. The exact details are a bit confusing to
me and I wondered if anyone could let me know exactly how the VTABLE slots
and the Inteface Map interact, and if my assumptions here are correct.

   So many pieces to keep track of!

   Thanks,

   Ben
Fabian Schmied - 23 Nov 2003 13:06 GMT
>     This is a bit of longshot because I'm sure not a lot of people know the
> major details of this, but I was wondering if anyone out there might be able
> to help me in my understanding of interface maps in the runtime.

I cannot answer your questions, but if you don't get any answers on this
group, I would you to ask at the DOTNET-ROTOR discussion group at
discuss.develop.com, some of the people there can probably answer your
questions.

Fabian

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.