Mapping calls to declarations
James Montgomerie
jrmg@dcs.ed.ac.uk
Tue Aug 14 14:24:00 GMT 2001
on 14/8/01 5:19 pm, Richard Henderson at rth@redhat.com wrote:
> On Tue, Aug 14, 2001 at 04:34:06PM +0100, James Montgomerie wrote: This seems
> to work, but the casting from pointers to ints and back makes me generally
> 'nervous'. If there's another, less messy, solution, I'd still be grateful if
> it was pointed out.
>
> Make the int be an index into an array in the backend.
>
I thought about this at first (both having an array of information and
having an array of pointers to allocated information), but thought it was
unsuitable because it would mean imposing a hard limit on the number of
function calls that can be made. What number would you say is a reasonable
limit? [Is there already a fixed limit imposed by the standard or the
compiler?]
>> Also, my knowledge of the garbage collector is near to zero - is this a safe
>> way to allocate and use memory (i.e. my memory's not going to be de-allocated
>> before I use it)?
>>
> No.
>
I take it this is 'No, it's not safe, your memory might bbe deallocated
before you use it'. Is there no safe way to dynamically allocate
garbage-collected memory in the backend?
Thanks for your help,
Jamie.
More information about the Gcc
mailing list