This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Storing, accessing type information at run time
- To: "His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated" <xenophon at irtnog dot org>
- Subject: Re: Storing, accessing type information at run time
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Thu, 24 Jun 1999 04:35:01 +0200
- Cc: egcs at egcs dot cygnus dot com
- References: <w4od7ympeml.fsf@nemesis.irtnog.org>
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