aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_port.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-02-25 15:38:55 +0100
committerLukas Larsson <[email protected]>2013-02-25 15:38:55 +0100
commit192440ab1fdad0f3924f7af8c6f0dbc4f47f70b1 (patch)
tree58dc0228903e1909e3374e6928da13be04d6c102 /erts/emulator/beam/erl_port.h
parentdf465d70c5e7833a393fea02eabf477bbe6c542b (diff)
downloadotp-192440ab1fdad0f3924f7af8c6f0dbc4f47f70b1.tar.gz
otp-192440ab1fdad0f3924f7af8c6f0dbc4f47f70b1.tar.bz2
otp-192440ab1fdad0f3924f7af8c6f0dbc4f47f70b1.zip
Set default max ports on win32 to 8192
Diffstat (limited to 'erts/emulator/beam/erl_port.h')
-rw-r--r--erts/emulator/beam/erl_port.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_port.h b/erts/emulator/beam/erl_port.h
index 4052f4dbe8..377aa72ed5 100644
--- a/erts/emulator/beam/erl_port.h
+++ b/erts/emulator/beam/erl_port.h
@@ -31,7 +31,18 @@ typedef struct ErtsProc2PortSigData_ ErtsProc2PortSigData;
#include "erl_thr_progress.h"
#include "erl_trace.h"
+#ifndef __WIN32__
#define ERTS_DEFAULT_MAX_PORTS (1 << 16)
+#else
+/*
+ * Do not default to as many max ports on Windows
+ * as there are no os limits to stop system
+ * from running amok. If allowed to go too high
+ * windows rarely recovers from the errors and
+ * other OS processes can be effected.
+ */
+#define ERTS_DEFAULT_MAX_PORTS (1 << 13)
+#endif /* __WIN32__ */
#define ERTS_MIN_PORTS 1024
extern int erts_port_synchronous_ops;