aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common/erl_mseg.c
AgeCommit message (Collapse)Author
2017-07-17erts: Remove ERTS_SMP and USE_THREAD definesLukas Larsson
This refactor was done using the unifdef tool like this: for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done where defile contained: #define ERTS_SMP 1 #define USE_THREADS 1 #define DDLL_SMP 1 #define ERTS_HAVE_SMP_EMU 1 #define SMP 1 #define ERL_BITS_REENTRANT 1 #define ERTS_USE_ASYNC_READY_Q 1 #define FDBLOCK 1 #undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT #define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0 #define ERTS_POLL_USE_WAKEUP_PIPE 1 #define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1 #undef ERTS_HAVE_PLAIN_EMU #undef ERTS_SIGNAL_STATE
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-05-04Update copyright yearRaimo Niskanen
2017-04-27Rename macro and add clarifying commentRichard Carlsson
The macro previously named 'LOG2' is in fact computing the LSB (not the MSB) of its input, and can only be used to compute log2(n) when n is is a power of 2, that is, when its LSB is also its MSB.
2017-04-25Merge pull request #1417 from mikpe/erts-erl_mseg-bad-cache-indexingRickard Green
erl_mseg.c: don't use invalid indices in - > cache_powered_node[] OTP-14360
2017-04-21erl_mseg.c: don't use invalid indices in - > cache_powered_node[]Mikael Pettersson
2017-02-14Fixed typos in ertsAndrew Dryga
2016-11-22Merge branch 'maint'Sverker Eriksson
2016-11-17erts: Refactor crash dumping with cbprintfSverker Eriksson
Instead of passing around a file descriptor use a function pointer to facilitate more advanced backend write logic such as size limitation or compression.
2016-10-14erts: Enable exec_alloc for all hipe architecturesSverker Eriksson
For non-amd64 it's a "normal" allocator with a wrapper around mseg_alloc to call mprotect(PROT_EXEC).
2016-04-29erts: Fix system_info({allocator_sizes, mseg_alloc})Sverker Eriksson
will now return [{instance,0,[{segments_size,9961472,9961472,11010048}]}, {instance,1,[{segments_size,6291456,6291456,6815744}]}, {instance,2,[{segments_size,524288,524288,786432}]}, {instance,3,[{segments_size,1048576,1048576,1835008}]}, {instance,4,[{segments_size,0,0,262144}]}] and not just empty lists.
2016-04-29erts: Move option info for erts_mmapSverker Eriksson
from {allocator,mseg_alloc} to {allocator,erts_mmap}
2016-04-20Merge branch 'sverker/hipe-code-alloc'Sverker Eriksson
2016-04-15erts: Add 'exec_alloc' for hipe codeSverker Eriksson
that uses its own super carrier (erts_exec_mmapper) to guarantee low addressed and executable memory (PROT_EXEC). Currently only used on x86_64 that needs low memory for HiPE/AMD64's small code model. By initializing erts_exec_mapper early we secure its low memory area before erts_literal_mmapper might steal it.
2016-04-15erts: Make ErtsMemMapper able to map memory with PROT_EXECSverker Eriksson
to prepare for hipe native code allocation.
2016-03-15update copyright-yearHenrik Nord
2016-03-08Merge branch 'sverk/literal-alloc-polish'Sverker Eriksson
* sverk/literal-alloc-polish: erts: Add emulator flag +MIscs for literal super carrier size erts: Refactor init of erts_literal_mmapper erts: Make literal_alloc documented and configurable
2016-02-24Merge branch 'master' into sverk/master/halt-INT_MINSverker Eriksson
2016-02-24erts: Change erl_exit into erts_exitSverker Eriksson
This is mostly a pure refactoring. Except for the buggy cases when calling erlang:halt() with a positive integer in the range -(INT_MIN+2) to -INT_MIN that got confused with ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT. Outcome OLD erl_exit(n, ) NEW erts_exit(n, ) ------- ------------------- ------------------------------------------- exit(Status) n = -Status <= 0 n = Status >= 0 crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0 The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and ERTS_DUMP_EXIT are the same as before (even though their values have changed).
2016-02-23erts: Refactor init of erts_literal_mmapperSverker Eriksson
2015-11-12erts: Add support for fast erts_is_literal()Sverker Eriksson
2015-11-12erts: Refactor erl_mmap to allow several mapper instancesSverker Eriksson
2015-06-24erts: Remove halfword MemKind msegBjörn-Egil Dahlberg
2015-06-24erts: Remove HALFWORD_HEAP definitionBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
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-09-30erts: Add erts_mmap statsSverker Eriksson
As part of erlang:system_info({allocator,mseg_alloc}) and erl_crash.dump
2013-09-30erts: Add HARD_DBG_MSEGSverker Eriksson
2013-09-30erts: erts_mmap improved free seg desc managementRickard Green
2013-09-30erts: Allow page aligned erts_munmap()Rickard Green
2013-09-30erts: Fix ASSERT bug and void* arithmeticsSverker Eriksson
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-05-06erts: Change some more 'long' to pointer sized int (ErlDrvUInt)Sverker Eriksson
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-13erts: Utilize even more cached sbc segmentsBjörn-Egil Dahlberg
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: Evict old cached segments for newer onesBjörn-Egil Dahlberg
2013-02-07erts: Refactor mseg cacheBjörn-Egil Dahlberg
Use double ended cache queues to evict oldest cache first
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2012-12-14erts: Clear entire mseg cache upon requestBjörn-Egil Dahlberg
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