[erlang-questions] The "ei" API and passing *shared* binaries / parts

Rick van Rein rick@REDACTED
Fri Jun 30 09:21:42 CEST 2017


Ah,

Vance Shipley wrote:
> You want to use a linked in driver:
> http://erlang.org/doc/tutorial/c_portdriver.html

Yes, that helps!  (Didn't see your response before somehow.)

Plus, following up on my own question, what seems to be needed to share
blobs would apparently be

 0. Have a blob uint8_t ptr [siz]
 1. Create an ETERM for it with erl_mk_binary (ptr, siz)
 2. Send with ei_encode_term
 3. Update refctr / free if needed (docs are not clear)

Sounds like a plan I to try and test.

Thanks,
-Rick





More information about the erlang-questions mailing list