aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2013-11-15Add sync option to file:open/2Joseph Blomstedt
The sync option adds the POSIX O_SYNC flag to the open system call on platforms that support the flag or its equivalent, e.g., FILE_FLAG_WRITE_THROUGH on Windows. For platforms that don't support it, file:open/2 returns {error, enotsup} if the sync option is passed in. The semantics of O_SYNC are platform-specific. For example, not all platforms guarantee that all file metadata are written to the disk along with the file data when the flag is in effect. This issue is noted in the documentation this commit adds for the sync option. Add a test for the sync option. Note however that the underlying OS semantics for O_SYNC can't be tested automatically in any practical way, so the test assumes the OS does the right thing with the flag when present. For manual verification, dtruss on OS X and strace on Linux were both run against beam processes to watch calls to open(), and file:open/2 was called in Erlang shells to open files for writing, both with and without the sync option. Both the dtruss output and the strace output showed that the O_SYNC flag was present in the open() calls when sync was specified and was clear when sync was not specified.
2013-11-11Merge branch 'sverk/valgrind-added-leak-check' into maintSverker Eriksson
* sverk/valgrind-added-leak-check: erts: Prevent valgrind from repeating same memory leaks reports
2013-11-07Merge branch 'lukas/cerl_dump/OTP-11468' into maintLukas Larsson
* lukas/cerl_dump/OTP-11468: erts: Add cerl -dump and dumping in z_SUITE
2013-11-07erts: Add cerl -dump and dumping in z_SUITELukas Larsson
2013-11-04Merge branch 'sverk/monitor-memory-leak/OTP-11410' into maintSverker Eriksson
* sverk/monitor-memory-leak/OTP-11410: erts: Fix memory leak for distributed monitors
2013-11-04erts: Prevent valgrind from repeating same memory leaks reportsSverker Eriksson
by using the macro VALGRIND_DO_ADDED_LEAK_CHECK if it exists for system_info({error_checker,memory})
2013-11-01erts: Add max alignment posix_memalign configure checkLukas Larsson
On some OSs posix_memalign exists, but it does not allow for alignment greater than the current page size. So we have to do a runtime check for alignment size and also add cross compile options.
2013-10-21Merge branch 'egil/fix-crashdump-pointer-crash/OTP-11420' into maintBjörn-Egil Dahlberg
* egil/fix-crashdump-pointer-crash/OTP-11420: erts: Fix segfaulting crashdump writing
2013-10-21Merge branch 'mhssler/fix-doc-typos/OTP-11414' into maintFredrik Gustafsson
* mhssler/fix-doc-typos/OTP-11414: Fix ssh doc typos Fix gen_sctp doc typo Fix erts erlang.xml doc typo
2013-10-18erts: Fix segfaulting crashdump writingBjörn-Egil Dahlberg
Crashdumps initiated by out-of-memory on spawn could cause the beam to segfault during crashdump writing due to invalid pointers. The pointers are invalid since the process creation never finished. This commit remedies this problem by removing the process from crashdump printout.
2013-10-17erts: Fix memory leak for distributed monitorsSverker Eriksson
2013-10-16Merge branch 'sverk/time-consistency-test' into maintSverker Eriksson
* sverk/time-consistency-test: erts: Fix time_SUITE:consistency to work over turn of the month
2013-10-16Fix erts erlang.xml doc typoMartin Hässler
badargif -> badarg if
2013-10-15Merge branch 'rickard-sverker/supercarrier/OTP-11149' into maintSverker Eriksson
* rickard-sverker/supercarrier/OTP-11149: (29 commits) erts: Add test case for erts_mmap erts: Add mutex to init_atoms in erts_mmap.c erts: Fix lock violation for init_atoms in erl_mmap.c erts: Fix misc minor bugs in supercarrier initialization erts: Add erts_mmap stats erts: Add erts_bld_tupleX macros erts: Rename erts_bld_atom_uint_2tup_list to *_uword_* erts: Fix bug in lookup_free_seg erts: Fix race bug in erts_munmap erts: Add HARD_DBG_MSEG erts: Refactor rbt_insert in erl_mmap erts: erts_mmap improved free seg desc management erts: Add documentation for +MMsc* system flags erts: Allow page aligned erts_munmap() erts: Sort tree in super aligned sizes (SA_SZ_ADDR_ORDER) erts: Fix ASSERT bug and void* arithmetics erts: Add mmap argument to erts_debug:get_internal_state erts: Improve erts_mmap out of free descriptor management erts: Cleanup erl_mmap erts: Add __func__ to ERTS_ASSERT macro ...
2013-10-14Merge branch 'fenollp/treewide_remove_unexpected_0xff/OTP-11323' into maintFredrik Gustafsson
* fenollp/treewide_remove_unexpected_0xff/OTP-11323: Remove ^L characters hidden randomly in the code. Not those used in text files as delimiters.
2013-10-10Fix bsr bugLars Hesel Christensen
Fix bsr bug occurring when shifting a huge number a huge number of bits to the right. The bug can occur if Sint is 64 bits and int is 32 bits, causing a truncation in the big.c:I_lshift function.
2013-10-10Add bsr test data showing bug when shifting large numbersLars Hesel Christensen
Add test data demonstrating that bsr is broken when shifting a large number a huge number of bits to the right.
2013-10-09Merge branch 'nox/silent-rules-fixes/OTP-11351' into maintFredrik Gustafsson
* nox/silent-rules-fixes/OTP-11351: Fix two small silent rules omissions
2013-10-03erts: Add test case for erts_mmapSverker Eriksson
2013-10-02erts: Add mutex to init_atoms in erts_mmap.cSverker Eriksson
2013-10-02erts: Fix lock violation for init_atoms in erl_mmap.cSverker Eriksson
by not holding the mseg lock while reading version and option info which is unnecessary anyway.
2013-10-02erts: Fix misc minor bugs in supercarrier initializationSverker Eriksson
2013-10-01erts: Fix time_SUITE:consistency to work over turn of the monthSverker Eriksson
2013-09-30erts: Add erts_mmap statsSverker Eriksson
As part of erlang:system_info({allocator,mseg_alloc}) and erl_crash.dump
2013-09-30erts: Add erts_bld_tupleX macrosSverker Eriksson
for compile time argument checking
2013-09-30erts: Rename erts_bld_atom_uint_2tup_list to *_uword_*Sverker Eriksson
and change from Uint to UWord values
2013-09-30erts: Fix bug in lookup_free_segSverker Eriksson
that could return segments that are too small after being super aligned.
2013-09-30erts: Fix race bug in erts_munmapSverker Eriksson
Must keep mutex to serialize (un)reserve ops.
2013-09-30erts: Add HARD_DBG_MSEGSverker Eriksson
2013-09-30erts: Refactor rbt_insert in erl_mmapSverker Eriksson
2013-09-30erts: erts_mmap improved free seg desc managementRickard Green
2013-09-30erts: Add documentation for +MMsc* system flagsRickard Green
2013-09-30erts: Allow page aligned erts_munmap()Rickard Green
2013-09-30erts: Sort tree in super aligned sizes (SA_SZ_ADDR_ORDER)Sverker Eriksson
2013-09-30erts: Fix ASSERT bug and void* arithmeticsSverker Eriksson
2013-09-30erts: Add mmap argument to erts_debug:get_internal_stateSverker Eriksson
2013-09-30erts: Improve erts_mmap out of free descriptor managementRickard Green
2013-09-30erts: Cleanup erl_mmapSverker Eriksson
2013-09-30erts: Add __func__ to ERTS_ASSERT macroSverker Eriksson
2013-09-30erts: Optimize rb-tree operations by "caching" parent ptrSverker Eriksson
2013-09-30erts: Use rbt_foreach_node to check_treeSverker Eriksson
2013-09-30erts: Add build_free_seg_listSverker Eriksson
2013-09-30erts: Remove HARD_DEBUG flags for tree traversalSverker Eriksson
2013-09-30erts: Save one word in ErtsFreeSegDescSverker Eriksson
by putting red/black color bit in 'parent' pointer
2013-09-30erts: erts_mmap supercarrier management and erts_mseg usageRickard Green
* Coalescing and trimming of free segments in supercarrier * Management of super aligned and super unaligned areas in supercarrier * Management of reservation of physical memory * erts_mseg usage of erts_mmap
2013-09-30erts: Prepare erl_mmap with tree structures for free seg storageSverker Eriksson
2013-09-30erts: Remove ASSERT_EXPR macroSverker Eriksson
2013-09-30erts: Refactor the ASSERT macroSverker Eriksson
Introduce unconditional ERTS_ASSERT and use that for both ASSERT and ASSERT_EXPR.
2013-09-30Merge branch 'maint-r16' into maintFredrik Gustafsson
Conflicts: erts/vsn.mk
2013-09-30Merge branch 'msassak/empty-pattern-badarg/OTP-11350' into maintFredrik Gustafsson
* msassak/empty-pattern-badarg/OTP-11350: stdlib: extended binary_module_SUITE to assure badarg for OTP-11350 Check all pattern arguments passed to binary:matches/2