This is the mail archive of the gcc@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] |
Sorry for the long email
This was based on an idea from Mike in Nov 2006 when i needed to ensure that the FUNCTION_DECL nodes were not collected by the garbage collector while i was still using them. You mentioned that i could do the above to get the garbage collector to think that the nodes are still being used. I also assumed that it could be used for working around the PCH engine.
Actually, no, it won't work, precompiled headers will fail to work because you'd need to modify the PCH writer to write your data, because you didn't mark your data structures with GTY and didn't use gc to allocate them.
I should just re-write my code to use the garbage collector to manage my data structures,
though it is a big job
Now i think i have resolved myself to the fact that if i want to support
PCH files, then I will need to modify my code to use the GTY markers and
GCC garbage collector.
* Does GCC use the PCH feature to speed up compilation of its standard libraries?
* If so is there a simple way of disabling this at configure time etc?
--enable-libstdcxx-pch build pre-compiled libstdc++ headers [default=$is_hosted]
* Is it possible to use the GTY(()) flags inside macros?
#define DECLARE_ARRAY(DataTypeName, DataType) \ struct DataTypeName##ArrayStruct \ { \
* Is it possible to explicitly free garbage collected memory if i know i
will not be needing it any more
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |