aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_ao_firstfit_alloc.c
AgeCommit message (Collapse)Author
2018-06-18Update copyright yearHenrik Nord
2018-05-22erts: Let allocator pooled_tree also use Age OrderSverker Eriksson
if configured for the allocator. This was not implemented and pooled_tree always used address order first fit. The "problem" was as a carrier can be part of both the pooled tree (of its owner) and the allocation tree (of a foreign instance) at the same time. Solved by duplicating 'birth_time' in both AOFF_RBTree_t nodes for each carrier. Blocks still cannot use age order and does not pay any memory cost for birth_time.
2018-03-09Always use sys_memcpy/cmp/etc instead of plain memcpy/cmp/etcJohn Högberg
2018-02-12Merge 'sverker/maint-20/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/master/alloc-n-migration/ERIERL-88'
2018-02-12Merge 'sverker/carrier-migration-improvements'Sverker Eriksson
into 'sverker/maint-19/alloc-n-migration/ERIERL-88'
2018-02-12erts: Add age order first fit allocator strategiesSverker Eriksson
ageffcaoff: Age First Fit Carrier, Address Order First Fit (within carrier) ageffcbf : Age First Fit Carrier, Best Fit (within carrier) ageffcaobf: Age First Fit Carrier, Address Order Best Fit (within carrier) Prefer old carriers, the older the better.
2018-02-08erts: Refactor erl_ao_firstfit_allocSverker Eriksson
In preparation for carrier age order. Change 'flavor' to 'blk_order' and 'crr_order'.
2017-12-20erts: Improve carrier pool searchSverker Eriksson
* Give back carrier to owner when put in pool with use of dd-queue. * Replace pooled_list with pooled_tree for more efficient search of all owned pooled carriers. * Remove traitor_list as it does not serve much purpose anymore. * Add HOMECOMING bit flag in crr->allctr atomic to (1) avoid double enqueue into dd-enqueue. (2) trigger read barrier in get_used_allctr for newly received carriers.
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-05-26erts: Add some more use of ErtsContainerStructSverker Eriksson
2016-03-15update copyright-yearHenrik Nord
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).
2015-10-01erts: Fix confusion of callbacks destroying_mbc() vs remove_mbc()Sverker Eriksson
Problem #1 Goodfit was crippled by the fact that destroying_mbc() was called _before_ the carriers was unlinked from mbc_list. Problem #2 destroying_mbc() was called for carriers that later could be resurrected from dc_list without a matching call to creating_mbc(). This was mostly a practical problem for the new test case alloc_SUITE:migration that use the callbacks to create/destroy a mutex. Solution: destroying_mbc() is now only called just before a carrier is destroyed (deallocated or put in mseg cache). remove_mbc() is called both (like before) when inserted into cpool but now also when last block is freed and mbc is scheduled for destruction but may later be resurrected from dc_list.
2015-06-18Change license text to APLv2Bruce Yinhe
2013-09-30erts: Refactor the ASSERT macroSverker Eriksson
Introduce unconditional ERTS_ASSERT and use that for both ASSERT and ASSERT_EXPR.
2013-06-19erts: Add new allocator strategy aoffcbfSverker Eriksson
with better performance than aoffcaobf as we don't have to rearrange the search tree when there are blocks of equal size.
2013-06-04erts: Carrier pool information in allocator informationRickard Green
That is, include information about carrier pool in result returned from erlang:system_info({allocator,allocator_sizes, _}).
2013-06-04erts: Use carrier pool for migration of carriersRickard Green
2013-06-03erts: Remove unnecessary flag arguments in allocatorsSverker Eriksson
A cleanup after SBMBC was removed.
2013-06-03erts: Remove SBMBC allocatorSverker Eriksson
2013-06-03erts: Add test for add_mbc and remove_mbc callbacksSverker Eriksson
2013-06-03erts: Fix deallocation in removed carrierSverker Eriksson
2013-06-03erts: Change naive list to rb-tree of carriers in AOFF allocatorSverker Eriksson
and add new callbacks add_mbc(), remove_mbc() and largest_fblk_in_mbc() for carrier migration.
2013-06-03erts: Prepare aoff allocator for carrier migrationSverker Eriksson
by putting blocks from different carrier into separate search trees. Carriers are currently organized in a naive linked list by address order.
2013-06-03erts: Make carrier header sizes customizableSverker Eriksson
This is a modified partial revert of 2ab1d972f6fd37c17b05
2013-06-03erts: Add "bestfit within carrier" for aoff allocator (aoffcbf)Sverker Eriksson
2013-05-06erts: Change some more 'long' to pointer sized int (ErlDrvUInt)Sverker Eriksson
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2012-11-21erts: Make carrier header sizes compile time constantsSverker Eriksson
No allocator strategy is using customized carrier headers anyway.
2012-11-15erts: Add carrier pointer to header of free blockSverker Eriksson
2012-11-15erts: Add carrier offset to internal allocation headersSverker Eriksson
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-09-29Update copyright yearsBjörn-Egil Dahlberg
2011-07-18New allocator: Address order first fit (aoff)Sverker Eriksson