This is the mail archive of the 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]

Re: Mapping calls to declarations

on 14/8/01 5:19 pm, Richard Henderson at 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

>> 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,

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