12 Avr
2013
12 Avr
'13
06:07
There is one thing that I've been meaning to ask for a long time now. I see most of the people tend to create arrays in C by malloc/___alloc_rc and then assigning values by iterating over them via a setter function (also defined with c-lambda). Isn't there a way to directly do this with a memcpy operation? Wouldn't that be faster? I understand that Gambit's heap and C's heap are separate, and you need to copy from one another in order to avoid GC touching any of FFI-created memory. But is it possible to improve this process using some sort of C function/macro from Gambit? I really can't find any code examples or reference for this. Thank you very much. Álvaro