help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Understanding the object layout.


From: Mathieu Suen
Subject: [Help-smalltalk] Understanding the object layout.
Date: Mon, 3 May 2010 19:40:33 +0200

Hi All,

I am trying to understand how the object are layout in memory.
I found out some information in libgst/gst.h.

So if I understand correctly the main structures is 
object_s and oop_s.

object_s contain size and class pointer plus the object ivs.
oops_s contain flags for GC I guess plus the pointer to an object_s.

My first question is why 2 structure?

My second question is concerning the object_s struct why there will always be 
at least one data?
  OOP data[1];                  /* variable length, may not be objects, 
                                   but will always be at least this
                                   big.  */

In other word: what would contain data if the instance is from a class with no 
ivs?


Finally I am wondering why objSize has type OOP? Is it because it is a real 
pointer to a SmallInteger? 

I might not guessing right.
Thanks for your answer.


        Mth









___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]