From 7e789df8dd9c7d86e9cc354521a37aa598aa5ec8 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 31 Oct 2012 23:31:50 +0100 Subject: Improve configuration of process and port tables --- system/doc/efficiency_guide/advanced.xml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'system') diff --git a/system/doc/efficiency_guide/advanced.xml b/system/doc/efficiency_guide/advanced.xml index 821175bb09..ac35a37bc4 100644 --- a/system/doc/efficiency_guide/advanced.xml +++ b/system/doc/efficiency_guide/advanced.xml @@ -123,12 +123,11 @@ On 64-bit architectures: 4 words for a reference from the current local node, an Processes

The maximum number of simultaneously alive Erlang processes is - by default 32768. This limit can be raised up to at most 268435456 - processes at startup (see documentation of the system flag - +P in the - erl(1) documentation). - The maximum limit of 268435456 processes will at least on a 32-bit - architecture be impossible to reach due to memory shortage.

+ by default 32768. This limit can be configured at startup, + for more information see the + +P + command line flag of + erl(1).

Distributed nodes @@ -184,13 +183,12 @@ On 64-bit architectures: 4 words for a reference from the current local node, an Open ports -

The maximum number of simultaneously open Erlang ports is - by default 1024. This limit can be raised up to at most 268435456 - at startup (see environment variable - ERL_MAX_PORTS - in erlang(3)) - The maximum limit of 268435456 open ports will at least on a 32-bit - architecture be impossible to reach due to memory shortage.

+

The maximum number of simultaneously oper Erlang ports is + often by default 16384. This limit can be configured at startup, + for more information see the + +Q + command line flag of + erl(1).

Open files, and sockets -- cgit v1.2.3 From 23c6f9e07a3cae7c05e55abd01ff798384241538 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Sun, 16 Sep 2012 02:45:32 +0200 Subject: Add erl_drv_[send|output]_term --- system/doc/efficiency_guide/drivers.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'system') diff --git a/system/doc/efficiency_guide/drivers.xml b/system/doc/efficiency_guide/drivers.xml index fec68ca059..b10595ea4d 100644 --- a/system/doc/efficiency_guide/drivers.xml +++ b/system/doc/efficiency_guide/drivers.xml @@ -105,9 +105,9 @@ client_port() ->

If you know that the binaries you return are always small, you should use driver API calls that do not require a pre-allocated binary, for instance - driver_output() + driver_output() or - driver_output_term() + erl_drv_output_term() using the ERL_DRV_BUF2BINARY format, to allow the run-time to construct a heap binary.

@@ -120,7 +120,7 @@ client_port() -> the driver to an Erlang process, the driver must first allocate the binary and then send it to an Erlang process in some way.

-

Use driver_alloc_binary() to allocate a binary.

+

Use driver_alloc_binary() to allocate a binary.

There are several ways to send a binary created with driver_alloc_binary().

@@ -128,17 +128,17 @@ client_port() ->

From the control callback, a binary can be returned provided that - set_port_control() + set_port_control_flags() has been called with the flag value PORT_CONTROL_FLAG_BINARY.

A single binary can be sent with - driver_output_binary().

+ driver_output_binary().

Using - driver_output_term() + erl_drv_output_term() or - driver_send_term(), + erl_drv_send_term(), a binary can be included in an Erlang term.

-- cgit v1.2.3 From 6e01408aba71e26884c5db81b8e4fa89bd803576 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 21 Sep 2012 15:12:07 +0200 Subject: Implement true asynchronous signaling between processes and ports --- system/doc/reference_manual/ports.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'system') diff --git a/system/doc/reference_manual/ports.xml b/system/doc/reference_manual/ports.xml index 4847dd67cd..c4e4ef1d35 100644 --- a/system/doc/reference_manual/ports.xml +++ b/system/doc/reference_manual/ports.xml @@ -87,8 +87,14 @@ of bytes, the option binary must be included.

The port owner Pid can communicate with the port Port by sending and receiving messages. (In fact, any - process can send the messages to the port, but the messages from - the port always go to the port owner).

+ process can send the messages to the port, but the port owner must + be identified in the message).

+

As of OTP-R16 messages sent to ports are delivered truly + asynchronously. The underlying implementation previously + delivered messages to ports synchronously. Message passing has + however always been documented as an asynchronous operation, so + this should not be an issue for an Erlang program communicating + with ports, unless false assumptions about ports has been made.

Below, Data must be an I/O list. An I/O list is a binary or a (possibly deep) list of binaries or integers in the range 0..255.

@@ -127,8 +133,7 @@ Messages Received From a Port.

Instead of sending and receiving messages, there are also a - number of BIFs that can be used. These can be called by any - process, not only the port owner.

+ number of BIFs that can be used.

port_command(Port,Data) -- cgit v1.2.3