aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc_util.c
AgeCommit message (Collapse)Author
2012-02-20Merge branch 'rickard/barriers/OTP-9922' into maintRickard Green
* rickard/barriers/OTP-9922: Reduce thread progress read operations in handle_aux_work() Misc memory barrier fixes
2012-02-19Misc memory barrier fixesRickard Green
- Document barrier semantics - Introduce ddrb suffix on atomic ops - Barrier macros for both non-SMP and SMP case - Make the thread progress API a bit more intuitive
2012-01-31erts: Correct incorrect assertion in erl_alloc_util.cBjörn Gustavsson
The incorrect assertion would fire when '+Muramv true' has been given, i.e. when a reallocation always forces a move. Change the assertion to not call the lock checker if the mutex is not used (because the allocator will only be accessed from a specific scheduler and thus no lock is needed).
2011-12-08Return true/false instead of num for +M<S>t infoLukas Larsson
OTP-7775
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-07-20Small fixups for rickard/sbmbc/OTP-9339Sverker Eriksson
alloc_no of sbmbc_low_alloc was set to ERTS_ALC_A_STANDARD_LOW
2011-07-08Use separate memory carriers for small blocksRickard Green
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-02-28Fixed end date in copyright note.Micael Karlberg
2011-02-10Verify that temp allocated memory is releasedRickard Green
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-10Store pointers to heap data in 32-bit wordsPatrik Nyblom
Store Erlang terms in 32-bit entities on the heap, expanding the pointers to 64-bit when needed. This works because all terms are stored on addresses in the 32-bit address range (the 32 most significant bits of pointers to term data are always 0). Introduce a new datatype called UWord (along with its companion SWord), which is an integer having the exact same size as the machine word (a void *), but might be larger than Eterm/Uint. Store code as machine words, as the instructions are pointers to executable code which might reside outside the 32-bit address range. Continuation pointers are stored on the 32-bit stack and hence must point to addresses in the low range, which means that loaded beam code much be placed in the low 32-bit address range (but, as said earlier, the instructions themselves are full words). No Erlang term data can be stored on C stacks (enforced by an earlier commit). This version gives a prompt, but test cases still fail (and dump core). The loader (and emulator loop) has instruction packing disabled. The main issues has been in rewriting loader and actual virtual machine. Subsystems (like distribution) does not work yet.
2010-03-10Fit all heap data into the 32-bit address rangePatrik Nyblom
This is the first step in the implementation of the half-word emulator, a 64-bit emulator where all pointers to heap data will be stored in 32-bit words. Code specific for this emulator variant is conditionally compiled when the HALFWORD_HEAP define has a non-zero value. First force all pointers to heap data to fall into a single 32-bit range, but still store them in 64-bit words. Temporary term data stored on C stack is moved into scheduler specific storage (allocated as heaps) and macros are added to make this happen only in emulators where this is needed. For a vanilla VM the temporary terms are still stored on the C stack.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP