This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Storing, accessing type information at run time


His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated wrote:
>  1. Store type information with each object, i.e. each object is
>     prefixed with a bit-field denoting its type.
>  2. Store type information outside of each object, e.g. in a hash.

3. Allocate objects so aligned pages contain only one object type.  A
   big array (mostly untouched memory) holds an O(1) mapping from page
   address to type.  Include the type "unknown" so you can deal (less
   efficiently) with malloc()d objects.

-- Jamie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]