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 ggc] fix ggc_alloc_rtvec_resized


On Tue, Aug 16, 2011 at 1:17 PM, Andreas Schwab <schwab@redhat.com> wrote:
> Liang Wang <netcasper@gmail.com> writes:
>
>> ?#define ggc_alloc_rtvec_sized(NELT) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
>> - ? ?(ggc_alloc_zone_vec_rtvec_def (sizeof (rtx), ? ? ? ? ? ? ? ? ? ? ? ?\
>> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sizeof (struct rtvec_def) + ((NELT) - 1), \
>> + ? ?(ggc_alloc_zone_vec_rtvec_def (1, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sizeof (struct rtvec_def) ? ? ? ? ? ?\
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+ ((NELT) - 1) * sizeof (rtx), ? ? ? \
>
> ggc_alloc_zone_vec_rtvec_def is for allocating an array of rtvec_def,
> but you want a single (variable sized) rtvec_def, so
> ggc_alloc_zone_rtvec_def is the correct function to call.

I'm not so sure about that given the more strongly typing of our allocators.
Laurynas?

Thanks,
Richard.

> Andreas.
>
> --
> Andreas Schwab, schwab@redhat.com
> GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 ?5EC7 45C6 250E 6F00 984E
> "And now for something completely different."
>


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