> isn't there a garbage collecting done at the end to remove all the unused stuff > to produce a binary that contains only the necessary parts ?
That very well might be the case, but given that tcc_get_symbol() can be used at any time between tcc_relocate() and tcc_delete(), it follows that _at least_ symbols are resident in the TCCState. What I'm wondering about is the feasibility of keeping just code and data, and flushing everything else. This would require a new API - something like tcc_finalize(TCCState *) or perhaps tcc_finalize(TCCState *, flags), where flags specify what to flush. I don't know enough about the internals, but if I'm willing to run with CONFIG_RUNMEM_RO, it seems like the per TCCState memory use in my case could be decreased from something like 29K to 1K or 2K. I should mention that the memory usage in my case is 29K regardless of whether CONFIG_RUNMEM_RO is 0 or 1. Thanks - Eric
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel