Regarding my previous question:
I'm able to compile to memory and use the compiled function.
Now, how can I unload/delete the function from memory?
I use the following lines to allocate space and relocate the code
(presumably for the symbol table information and code):
TCCState *state = tcc_new();
tcc_set_output_type(state, TCC_OUTPUT_MEMORY);
tcc_compile_string(state, code);
void *mem = malloc( tcc_relocate(state, NULL) ); // get size
tcc_relocate(state, mem);
If I use following line:
free(mem);
Will that completely free up the memory consumed by the symbol
table information and relocated code?
Thanks