Storing, accessing type information at run time

Jamie Lokier egcs@tantalophile.demon.co.uk
Wed Jun 30 15:43:00 GMT 1999


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



More information about the Gcc mailing list