;
> >  
> > Memory – CommonToken (32-bit system):
> > ·         8 bytes overhead for being a class
> > ·         36 bytes overhead for member variables
> >  
> > Memory – CommonToken (64-bit system):
> > ·         16 bytes overhead for being a class (I believe that’s the
> object header size)
> > ·         44 bytes overhead for members

IIRC, the object header part is merely a pointer to the type information, so 
I'm kinda surprised to see 8 bytes / 16 bytes instead 4 bytes / 8 bytes. You 
sure you measured correctly?

> >  
> > Memory – SlimToken (32- or 64-bit systems):
> > ·         8 bytes total storage, and no allocations since it’s a
> value type.
> >  

Being pedantic here :), but value types still allocate memory. Usually on the 
stack, unless they are part of a class, which allocates them on the heap.

Johannes
-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to