no, you cannot mix different virtual machines with different garbage collectors within the same process.What? Yes you can. I do it all the time. Lots and lots of processes link against both libpython and libperl, which have their own independent virtual machines with their own different GCs. There are even bridges permitting e.g. Python and Lua to talk to each other (both VMs with their own independent GCs). What you have to do is ensure that no piece of data ever ends up traversed by more than one GC, which just means designing the FFI right. (Lua's is designed right for this: I don't know about other languages.)
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds