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]
Other format: [Raw text]

Re: RFC: GC allocating everything with a type, part 1

Or pass the type code for GC allocated data structs.  Or perhaps it's
not even necessary, I'm not sure yet.  The whole GC system is pretty

'pass the type code' how?
As a parameter (or multiple parameters for multiple different types) to splay_tree_new_ggc or whatever.

So, you wouldn't need this size field any more, saving you 4 or 8
bytes per object.

If you mean the alloc_chunk's size field (it's hard to tell, i'm not ready incredibly carefully though), the size fields is 15 bits + one bit to say if the object is large or not (large objects have the size field multiplied by a constant).

I don't think it actually makes any difference in the size of the alloc chunk structure due to alignment.

I think you missed the '*' in the line above. This is not a pointer to a struct rtx_def, it is a pointer to a separately-allocated chunk of memory that contains pointers to struct rtx_def. What type does the separately-allocated chunk have?
None,ATM, since we don't know how to mark it separately anyway (it's marked as part of emit_status's marker).
Thus, we just wouldn't cut off marking there.

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