From b473a5412dc141a009189b76b5d69dc43bacbd69 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Mon, 11 Feb 2013 17:07:32 +0100
Subject: erts: Fix memory leak in efile_drv.c
Seems to happen with async threads and when user closes
the file explicitly before the port is closed.
---
erts/emulator/drivers/common/efile_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c
index fda6cf2e53..2279fec72a 100644
--- a/erts/emulator/drivers/common/efile_drv.c
+++ b/erts/emulator/drivers/common/efile_drv.c
@@ -2263,6 +2263,8 @@ file_stop(ErlDrvData e)
desc->fd = FILE_FD_INVALID;
desc->flags = 0;
cq_execute(desc);
+ } else {
+ EF_FREE(desc);
}
} else {
if (desc->fd != FILE_FD_INVALID) {
--
cgit v1.2.3
From b726ddb701dda96ad180509c51ba52dc1a9cc79e Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Mon, 11 Feb 2013 17:08:42 +0100
Subject: erts: Fix documentation about 10 default async threads.
---
erts/doc/src/erl_driver.xml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml
index 1212c34586..0e27f8a5bd 100644
--- a/erts/doc/src/erl_driver.xml
+++ b/erts/doc/src/erl_driver.xml
@@ -1960,9 +1960,7 @@ ERL_DRV_EXT2TERM char *buf, ErlDrvUInt len
emulator thread. This enables the driver to perform
time-consuming, blocking operations without blocking the
emulator.
- Erlang is by default started without an async thread pool. The
- number of async threads that the runtime system should use
- is specified by the
+
The async thread pool size can be set with the
+A
command line argument of erl(1).
If no async thread pool is available, the call is made
--
cgit v1.2.3