Age | Commit message (Collapse) | Author |
|
|
|
erlang:system_flag(multi_scheduling, block | unblock) could
deadlock the runtime system.
|
|
In an SMP emulator, two of the test cases in statistics_SUITE
frequently fail.
Remove the runtime_zero_update/1 test case, because you can't
really expect an SMP emulator not to spend any CPU time at
all even if no Erlang process is active.
Adjust the runtime_update/1 test case to not fail if the
measured times are note close enough. It will still fail
if statistics(runtime) would fail or return the wrong type.
|
|
* egil/binary-gc:
Add documentation for binary heap size settings.
Add tracing capabilities for binary virtual heap
Add min heap size start options to beam and erl
Improve binary garbage collection
OTP-8370 The default settings for garbage collection of binaries has been
adjusted to be less aggressive than in R13B03. It is now also
possible configure the settings for binary GC. See the
documentation for spawn_opt/2-5, erlang:system_info/1,
erlang:system_flag/2, process_flag/2-3, erlang:trace/3, and the
documenation for erl for the new command line options +hms and
+hmbs.
|
|
The garbage collector in r13b03 is too aggressive in some cases. This
commit raises the level of default initial allowed binary garbage
(virtual heap for binaries) before collecting from 233 words to
46368 words (181 kB on 32-bit).
A new option, min_bin_vheap_size, has been added to spawn_opt,
system_flag and process_flag can be used to change the default values.
The option can also be used with system_info and process_info to
inspect the values.
For symmetry the option min_heap_size has been added to the above
functions where it was previously missing.
Add testcases for min_bin_vheap_size and min_heap_size for
functions process_flag/2, process_info/2, system_info/2 and
spawn_opt/2.
|
|
fragments was created. This will mainly benefit NIFs that return
large compound terms.
|
|
* jv/binary_to_term-opts:
document ErtsExternalDist flags and CON_ID mask
add options to binary_to_term
OTP-8367 There is new erlang:binary_to_binary/2 BIF that takes an option
list. The option safe can be used to prevent creation of
resources that are not garbage collected (such as atoms). (Thanks
to Jayson Vantuyl.)
|
|
term_to_binary and binary_to_term are powerful tools that can be used easily in
lieu of a custom binary network protocol. Unfortunately, carefully crafted
data can be used to exhaust the memory in an Erlang node by merely attempting
to decode binaries. This makes it unsafe to receive data from untrusted
sources.
This is possible because binary_to_term/1 will allocate new atoms and new
external function references. These data structures are not garbage collected.
This patch implements the new form of binary_to_term that takes a list of
options, and a simple option called 'safe'. If specified, this option will
cause decoding to fail with a badarg error if an atom or external function
reference would be allocated.
In the general case, it will happily decode any Erlang term other than those
containing new atoms or new external function references. However, fun, pid,
and ref data types can embed atoms. They might fail to decode if one of these
embedded atoms is new to the node. This may be an issue if encoded binaries
are transferred between nodes or persisted between invocations of Erlang.
|
|
NIF function prototypes in order to allow more than 3 function
arguments. Also an incompatible change in the return value of
erlang:load_nif/2. Added support for references, floats and term
comparison in NIFs. Read more in the documentation of erl_nif and
erlang:load_nif/2.
|
|
NIF function prototypes in order to allow more than 3 function
arguments. Also an incompatible change in the return value of
erlang:load_nif/2. Added support for references, floats and term
comparison in NIFs. Read more in the documentation of erl_nif and
erlang:load_nif/2.
|
|
|