This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [patch] shrink some cp/parser.c structures



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?

Thanks,
Andrew Pinski


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