aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/common/erl_mseg.c
AgeCommit message (Collapse)Author
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
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: Move carrier alignment define to erl_msg.hSverker Eriksson
2012-11-13erts: New mseg allocator cacheBjörn-Egil Dahlberg
* utilize the power of two
2012-11-13erts: Teach mseg alloc the value of halfword beamBjörn-Egil Dahlberg
2012-11-13erts: Let mseg allocate larger alignmentsBjörn-Egil Dahlberg
2012-10-31erts: Remove faked MSEG_ALLOCBjörn-Egil Dahlberg
* Not used except in valgrind but there mseg is disabled completely via Meamin.
2011-11-16Remove remaining gcc 4.6 assigned-but-not-used warnings from ertsPatrik Nyblom
2011-11-13Replace system block with thread progress blockRickard Green
The ERTS internal system block functionality has been replaced by new functionality for blocking the system. The old system block functionality had contention issues and complexity issues. The new functionality piggy-backs on thread progress tracking functionality needed by newly introduced lock-free synchronization in the runtime system. When the functionality for blocking the system isn't used there is more or less no overhead at all. This since the functionality for tracking thread progress is there and needed anyway.
2011-11-13Optimize memory allocationRickard Green
A number of memory allocation optimizations have been implemented. Most optimizations reduce contention caused by synchronization between threads during allocation and deallocation of memory. Most notably: * Synchronization of memory management in scheduler specific allocator instances has been rewritten to use lock-free synchronization. * Synchronization of memory management in scheduler specific pre-allocators has been rewritten to use lock-free synchronization. * The 'mseg_alloc' memory segment allocator now use scheduler specific instances instead of one instance. Apart from reducing contention this also ensures that memory allocators always create memory segments on the local NUMA node on a NUMA system.
2011-05-09Expand the use of high memory allocation in halfword emulatorSverker Eriksson
Also add 'low' field in system_info(allocator) SHORT_LIVED is still in low memory
2011-03-16erts_printf %be to print integers of size EtermSverker Eriksson
Existing %bp to print pointer size integers does not work in halfword emulator to print Eterm size integers.
2011-03-09Make halfword emulator with valgrind target allocate low memorySverker Eriksson
Limit ERTS_MSEG_FAKE_SEGMENTS (that is otherwise set for valgrind target) to not apply to low memory needed by halfword emulator. This will reduce the fault detection capability of valgrind for low memory. Also correct a bug in the initial mmap and make sure the returned memory region does not reach into high memory.
2011-02-03HALFWORD Make system_info mseg_alloc report both low/high memSverker Eriksson
2011-02-03HALFWORD Make more allocators use high mem (binary, fixed and driver)Sverker Eriksson
2011-02-03HALFWORD ETS 32-bit arch fixes and other cleanupsSverker Eriksson
2011-02-03HALFWORD first stab at high mem allocSverker Eriksson
2011-02-03HALFWORD ETS relative termsSverker Eriksson
In halfword emulator, make ETS use a variant of the internal term format that uses relative offsets instead of absolute pointers. This will allow storage in high memory (>4G). Preprocessor macros (like list_val_rel(TERM,BASE)) are used to make normal (fullword) emulator almost completely unchanged while still reusing most of the code.
2010-12-20Refactor timer interfaceBjörn-Egil Dahlberg
2010-08-13Add support for NetBSDMartti Kuparinen
These are the current NetBSD pkgsrc patches.
2010-04-28OTP-8591 Race in mseg cashe on non-SMP with async threadsSverker Eriksson
Fix memory management bug causing crash of non-SMP emulator with async threads enabled. The bug did first appear in R13B03.
2010-03-22Merge branch 'pan/otp_8332_halfword' into devErlang/OTP
* pan/otp_8332_halfword: Teach testcase in driver_suite the new prototype for driver_async wx: Correct usage of driver callbacks from wx thread Adopt the new (R13B04) Nif functionality to the halfword codebase Support monitoring and demonitoring from driver threads Fix further test-suite problems Correct the VM to work for more test suites Teach {wordsize,internal|external} to system_info/1 Make tracing and distribution work Turn on instruction packing in the loader and virtual machine Add the BeamInstr data type for loaded BEAM code Fix the BEAM dissambler for the half-word emulator Store pointers to heap data in 32-bit words Add a custom mmap wrapper to force heaps into the lower address range Fit all heap data into the 32-bit address range
2010-03-10Fix further test-suite problemsPatrik Nyblom
Fix safe_mul in the loader, which caused failures in the bit syntax test cases. Fix yet another Uint in erl_alloc.h (ERTS_CACHE_LINE_SIZE) causing segmentation fault when we have many schedulers (why only in that situation?). Clean up erl_mseg (remove old code for the Linux 32-bit mmap flag). While at it, also remove compilation warnings.
2010-03-10Add a custom mmap wrapper to force heaps into the lower address rangePatrik Nyblom
The free list is still rudimentary for the mmap wrapper and a better implementation will be needed for production quality.