aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common
AgeCommit message (Collapse)Author
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-06-10Merge branch 'sverk/darwin-unlimited-select' into maintSverker Eriksson
* sverk/darwin-unlimited-select: erts: Fix dynamic select for darwin erts: Refactor unlimited select patch erts: Fix bug in unlimited fd_set patch Use _DARWIN_UNLIMITED_SELECT in erl_poll
2013-06-04Merge branch 'rickard/stale-driver-select/OTP-11084' into maintRickard Green
* rickard/stale-driver-select/OTP-11084: Fix crash when reporting stale driver select
2013-06-04erts: Fix dynamic select for darwinSverker Eriksson
Make sure the fd-sets (read and write) are of equal size.
2013-05-28erts: Refactor unlimited select patchSverker Eriksson
An attempt to beautify the code by reducing the amount of #ifdef's in the hot code path.
2013-05-28erts: Fix bug in unlimited fd_set patchSverker Eriksson
2013-05-12Use _DARWIN_UNLIMITED_SELECT in erl_pollAnthony Ramine
This allows erl_poll to select() on file descriptors greater than FD_SETSIZE (1024) on Darwin. The fd sets are manually (re)allocated and freed.
2013-05-06erts: Change some more 'long' to pointer sized int (ErlDrvUInt)Sverker Eriksson
2013-05-06Fix crash when reporting stale driver selectRickard Green
2013-03-08compilation fix for NetBSDYAMAMOTO Takashi
spells __NetBSD__ correctly.
2013-03-07Merge branch 'egil/fix-mseg_dealloc-arguments/OTP-10912' into maintBjörn-Egil Dahlberg
* egil/fix-mseg_dealloc-arguments/OTP-10912: erts: Fix refactor error in mseg
2013-03-05erts: Fix refactor error in msegBjörn-Egil Dahlberg
Faulty number of arguments to mseg_dealloc. Problem arises if we try to compile halfword on operating system which do not have mremap. Not a supported case.
2013-03-04erts: Fix void * arithmeticBjörn-Egil Dahlberg
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-18Add +pc {latin1|unicode} switch and io:printable_range/0Patrik Nyblom
This is the base for implementing configurable ~tp printouts, so that the user can define which characters to view as actually printable in the shell and by io_lib:format. The functionality is neither documented nor used in this commit
2013-02-14Merge branch 'rickard/r16b/port-optimizations-fixes/OTP-10809'Rickard Green
* rickard/r16b/port-optimizations-fixes/OTP-10809: Add erl_drv_busy_msgq_limits() to driver API on Windows Fix driver port accesses Fix port exit
2013-02-13Merge branch 'egil/enhance-mseg-cache/OTP-10840'Björn-Egil Dahlberg
* egil/enhance-mseg-cache/OTP-10840: erts: Utilize even more cached sbc segments erts: Prefer sbc segment caching over mbc segments erts: Segment allocator CircleQ API erts: Increase default #cached segments to 10 erts: Evict old cached segments for newer ones erts: Refactor mseg cache
2013-02-13erts: Utilize even more cached sbc segmentsBjörn-Egil Dahlberg
2013-02-13Merge branch 'saleyn/float_to_list_2/OTP-10837'Lukas Larsson
* saleyn/float_to_list_2/OTP-10837: Fix memory leak in error case Use macros instead of constants float_to_list/2 changed rounding and cosmetic cleanup
2013-02-13Use macros instead of constantsLukas Larsson
This is needed as C90 (and therefore the win32 compiler) does not allow constants to be calculations based on other constants.
2013-02-13Fix driver port accessesRickard Green
2013-02-12erts: Prefer sbc segment caching over mbc segmentsBjörn-Egil Dahlberg
2013-02-11erts: Segment allocator CircleQ APIBjörn-Egil Dahlberg
2013-02-11erts: Increase default #cached segments to 10Björn-Egil Dahlberg
Previous default was 5.
2013-02-11erts: Evict old cached segments for newer onesBjörn-Egil Dahlberg
2013-02-11Make prim_file skip invalid filenames in unicode modePatrik Nyblom
The fix affects list_dir and read_link. Raw filenames are now never produced, just consumed even if +fnu or +fna is used on Linux etc. This also adds the options to get error return or error handler warning messages with +fn{u|a}{i|w|e} as an option to erl. This is still not documented and there needs to be other versions of read_dir and read_link to facilitate reading of all types of filenames and links. A check that we will not change to an invalid directory is also needed.
2013-02-07erts: Refactor mseg cacheBjörn-Egil Dahlberg
Use double ended cache queues to evict oldest cache first
2013-02-07float_to_list/2 changed rounding and cosmetic cleanupSerge Aleynikov
Changed rouding to round half-way up instead of down. Cosmetic cleanup and error handling of additional edge cases.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-21Text representation of a float formatted using given options.Serge Aleynikov
This BIF solves a problem of float_to_list/1 that doesn't allow specifying the number of digits after the decimal point when formatting floats. float_to_list(Float, Options) -> string() Float = float() Options = [Option] Option = {decimals, Decimals::0..249} | {scientific, Decimals::0..249} | compact Returns a string which corresponds to the text representation of a `Float` formatted using given options. When decimals option is specified the returned value will contain at most `Decimals` number of digits past the decimal point. When `compact` option is provided the trailing zeros at the end of the list are truncated (this option is only meaningful together with the `decimals` option). When `scientific` option is provided, the float will be formatted using scientific notation with `Decimals` digits of precision. If `Options` is `[]` the function behaves like `float_to_list/1`. When using `decimals` option and the number doesn't fit in the static internal buffer of 256 bytes the function throws `badarg`.
2012-12-14Merge branch 'sverk/egil/r16/new-alloc-header-scheme/OTP-10273'Björn-Egil Dahlberg
OTP-10415 * sverk/egil/r16/new-alloc-header-scheme/OTP-10273: (42 commits) erts: Make ll main mbc fit into 2pow size erts: Clear entire mseg cache upon request erts: Reduce max heap sizes tests: Refactor away ?line macro in beam_SUITE tests: Fix heap_sizes check tests: Refactor away ?line macro in process_SUITE tests: Use new correct min_bin_vheap_size in test erts: Set super alignment (256kb) and limits for sbct (8Mb) and lmbcs (128Mb) erts: Do not cache segments that are misaligned erts: Add mseg cache for large sbc segments erts: Reintroduce mseg options amcbf and rmcbf erts: Optimize erl_alloc_util.c by substitute MBC_BLK_SZ erts: Fix bug when allocating size near sbc_threshold erts: Make gc sizes fit into MB Carrier blocks erts: Force sbmbc to be disabled in a crude way erts: Fix new header scheme for win64 erts: Fix mseg cache. Malplaced NULL pointer erts: Remove unused mseg options amcbf and rmcbf erts: Use aligned bits as constant in mseg_alloc erts: Don't let zero be considered a power of two ... Conflicts: erts/emulator/test/process_SUITE.erl
2012-12-14erts: Clear entire mseg cache upon requestBjörn-Egil Dahlberg
2012-12-14erts: Set super alignment (256kb) and limits for sbct (8Mb) and lmbcs (128Mb)Sverker Eriksson
2012-12-14erts: Do not cache segments that are misalignedBjörn-Egil Dahlberg
* SBC may realloc carriers to misaligned addresses which is perfectly fine. However, those segments may not be cached because MBC allocations might find them and MBC's *needs* correct alignment.
2012-12-14erts: Add mseg cache for large sbc segmentsBjörn-Egil Dahlberg
* Not a power of two (unpowered) segements
2012-12-14erts: Reintroduce mseg options amcbf and rmcbfBjörn-Egil Dahlberg
Used with new sbc cache
2012-12-14erts: Fix mseg cache. Malplaced NULL pointerBjörn-Egil Dahlberg
2012-12-14erts: Remove unused mseg options amcbf and rmcbfBjörn-Egil Dahlberg
2012-12-14erts: Use aligned bits as constant in mseg_allocBjörn-Egil Dahlberg
HAVE_SUPER_ALIGNED_MB_CARRIERS is always true with mmap and thus aligned bits is a constant and so is "page" size for mmap. Conflicts: erts/emulator/sys/common/erl_mseg.h
2012-12-07Merge branch 'rickard/port-optimizations/OTP-10336' into ↵Rickard Green
rickard/r16/port-optimizations/OTP-10336 * rickard/port-optimizations/OTP-10336: Change annotate level for emacs-22 in cerl Update etp-commands Add documentation on communication in Erlang Add support for busy port message queue Add driver callback epilogue Implement true asynchronous signaling between processes and ports Add erl_drv_[send|output]_term Move busy port flag Use rwlock for driver list Optimize management of port tasks Improve configuration of process and port tables Remove R9 compatibility features Use ptab functionality also for ports Prepare for use of ptab functionality also for ports Atomic port state Generalize process table implementation Implement functionality for delaying thread progress from unmanaged threads Conflicts: erts/doc/src/erl_driver.xml erts/doc/src/erlang.xml erts/emulator/beam/beam_bif_load.c erts/emulator/beam/beam_bp.c erts/emulator/beam/beam_emu.c erts/emulator/beam/bif.c erts/emulator/beam/copy.c erts/emulator/beam/erl_alloc.c erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_bif_port.c erts/emulator/beam/erl_bif_trace.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_message.c erts/emulator/beam/erl_port_task.c erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_process_lock.c erts/emulator/beam/erl_trace.c erts/emulator/beam/export.h erts/emulator/beam/global.h erts/emulator/beam/io.c erts/emulator/sys/unix/sys.c erts/emulator/sys/vxworks/sys.c erts/emulator/test/port_SUITE.erl erts/etc/unix/cerl.src erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/prim_inet.beam erts/preloaded/src/prim_inet.erl lib/hipe/cerl/erl_bif_types.erl lib/kernel/doc/src/inet.xml lib/kernel/src/inet.erl
2012-12-03Optimize management of port tasksRickard Green
2012-12-03Use ptab functionality also for portsRickard Green
2012-12-03Prepare for use of ptab functionality also for portsRickard Green
2012-12-03Atomic port stateRickard Green
2012-11-21erts: Don't let zero be considered a power of twoBjörn-Egil Dahlberg
2012-11-21erts: Use MSEG_ALIGN_BITS and MSEG_ALIGNED_SIZEBjörn-Egil Dahlberg
* Don't redfine ALIGN_BITS or ALIGNED_SIZE, the global defined MSEG_* constants are just as good.
2012-11-15erts: Add carrier pointer to header of free blockSverker Eriksson
2012-11-15erts: Move carrier alignment define to erl_msg.hSverker Eriksson
2012-11-15erts: Add carrier offset to internal allocation headersSverker Eriksson
2012-11-13erts: New mseg allocator cacheBjörn-Egil Dahlberg
* utilize the power of two