[erlang-questions] moving data to and from a linked in driver
Dennis Novikov
dennis.novikov@REDACTED
Wed Jun 3 21:48:53 CEST 2009
Hi, Sergej.
On Wed, 2009-06-03 at 19:59 +0200, Rapsey wrote:
> Does sending binary data to a linked in driver, either through a
> port_command or port_control, involve a memory allocation and memcpy? How
> about the reverse (from driver to erlang)?
Don't know about passing data into driver, but I can answer second part
of your question.
If port flag set to PORT_CONTROL_FLAG_BINARY, returned buffer treated as
ref-counted binary by the erlang emulator. And, apparently, it does not
get copied.
--
HTH,
Dennis Novikov
More information about the erlang-questions
mailing list