[patch] shrink some cp/parser.c structures
Dan Nicolaescu
dann@ics.uci.edu
Tue Jun 24 08:14:00 GMT 2003
Andrew Pinski <pinskia@physics.uc.edu> writes:
> On Monday, Jun 23, 2003, at 20:17 US/Eastern, Dan Nicolaescu wrote:
>
> >
> > Some structures in cp/parserc.c can be made smaller by using enum
> > bitfields.
> >
> > Before this patch, on a 32bit machine, sizeof (struct
> > cp_token_block) = 652
> > so ggc-page.c would allocate a cp_token_block on a 1024 byte page,
> > resulting in a lot of overhead. This patch tries to make sure that
> > struct cp_token_block would fit in a 512B block. Is that OK, or is
> > 1024B better?
>
> It is almost always good to reduce the structs sizes.
> Should those enum bitfields be using the marco ENUM_BITFIELD instead?
The cp files are compiled with gcc, so it shouldn't be needed, but if
ENUM_BITFIELD is desired I will do it.
More information about the Gcc-patches
mailing list