aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc_util.c
AgeCommit message (Collapse)Author
2015-06-24erts: Remove HALFWORD_HEAP definitionBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-25Fix statistics reported about fix alloc typesRickard Green
2014-12-02erts: Add compile time assert ERTS_CT_ASSERTSverker Eriksson
and usage
2014-10-20erts: Fix bug causing mbc to be deleted from cpool before it was insertedSverker Eriksson
Set IN_POOL flag _after_ mbc has been actually inserted. Earlier it did not matter if IN_POOL was set early as it was not possible to find a carrier before is was fully inserted. Now when searching pooled_list and traitor_list we must make sure a found carrier has been fully inserted into cpool before removing it.
2014-10-06erts: Fix bug causing mbc removed from cpool to be used at pool entranceSverker Eriksson
Clear both IN_POOL and BUSY flags when empty carrier is removed is removed from pool to be destroyed. Earlier it was enough to leave BUSY flag set but now with pooled_list we must clear IN_POOL to avoid using it as cpool_entrance in cpool_fetch().
2014-10-03erts: Add pooled_list and traitor_listSverker Eriksson
2014-10-03erts: Fix bug when delayed deallocated carrier is reused by cpool_fetchSverker Eriksson
The delayed dealloc queue destroyes one word but cpool_fetch() is expected to return healthy carriers. So we restore that overwritten word with a little bit of hackish code.
2014-06-27erts: Fix size overflow bugs in memory allocationSverker Eriksson
2014-02-24erts: Make source file info available in lcLukas Larsson
2013-12-02Remove uninitialized use of new_crr in erl_alloc_utilAnthony Ramine
When the offending code is reached, new_crr is either uninitalized or have been set to NULL. This patch removes the following warning: beam/erl_alloc_util.c:3510:6: warning: variable 'new_crr' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (!(flags & CFLG_FORCE_MSEG)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ beam/erl_alloc_util.c:3567:23: note: uninitialized use occurs here DEBUG_SAVE_ALIGNMENT(new_crr); ^~~~~~~ beam/erl_alloc_util.c:674:51: note: expanded from macro 'DEBUG_SAVE_ALIGNMENT' UWord algnmnt__ = sizeof(Unit_t) - (((UWord) (C)) % sizeof(Unit_t));\ ^ beam/erl_alloc_util.c:3510:2: note: remove the 'if' if its condition is always true if (!(flags & CFLG_FORCE_MSEG)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ beam/erl_alloc_util.c:3438:23: note: initialize the variable 'new_crr' to silence this warning Carrier_t *new_crr, *old_crr; ^ = NULL
2013-11-28Merge branch 'lukas/erts/supercarrier_fix/OTP-11149' into maintLukas Larsson
* lukas/erts/supercarrier_fix/OTP-11149: Improve error info when main carrier creation fails Conflicts: erts/emulator/test/alloc_SUITE.erl
2013-11-27Merge branch 'sverk/allctr-4byte-align-bug' into maintSverker Eriksson
* sverk/allctr-4byte-align-bug: erts: Fix alignment bug in allocator start code OTP-11496
2013-11-25Improve error info when main carrier creation failsLukas Larsson
Also fix testcase that failed due to main carrier creation failure.
2013-11-25Merge branch 'rickard/acul-bug/OTP-11456' into maintRickard Green
* rickard/acul-bug/OTP-11456: Ensure carrier pool only accessed by schedulers
2013-11-20erts: Fix alignment bug in allocator start codeSverker Eriksson
Bug never released.
2013-11-05Add switch for disabling sys_alloc carriersRickard Green
The switch "+Musac <boolean>" controls if sys_alloc carriers are allowed.
2013-11-01Ensure carrier pool only accessed by schedulersRickard Green
Disable carrier pool for the thread safe allocator instance 0. This since non-managed threads allocates and deallocates memory in this instance, and only managed threads are allowed to access the carrier pool.
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: Refactor the ASSERT macroSverker Eriksson
Introduce unconditional ERTS_ASSERT and use that for both ASSERT and ASSERT_EXPR.
2013-09-25Merge branch 'rickard/aligned-sys_alloc-carriers/OTP-11318' into ↵Rickard Green
rickard/aligned-sys_alloc-carriers_maint/OTP-11318 Conflicts: erts/emulator/beam/erl_alloc.c erts/emulator/beam/erl_alloc_util.c erts/emulator/beam/erl_alloc_util.h
2013-09-25Implement platform specific aligned sys_alloc and use when supportedRickard Green
erts_sys_aligned_alloc() is currently implemented using posix_memalign if it exist, or using _aligned_malloc on Windows. If erts_sys_aligned_alloc() exist allocators will create sys_alloc carriers similar to how this was done pre-R16.
2013-08-23erts: Fix print out of acul option in crash dumpLukas Larsson
2013-06-10erts: Fix management of redirected carrier to deallocateRickard Green
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-04erts: Implement test case for carrier poolRickard Green
2013-06-04erts: Implement carrier poolRickard Green
2013-06-04erts: Fix type errors in info functionsRickard Green
2013-06-04erts: Use Uint64 for call countsRickard 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: 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-22Merge branch 'sverk/win64-fixes' into maintSverker Eriksson
* sverk/win64-fixes: erts: Change some more 'long' to pointer sized int (ErlDrvUInt) erts: Fix crash in nif_SUITE for win64 erts: Fix assert in isdigit for negative characters
2013-05-06erts: Change some more 'long' to pointer sized int (ErlDrvUInt)Sverker Eriksson
2013-04-15erts: Fix locking order violation for allocation wrappersSverker Eriksson
Some query functions in erl_alloc_util.c lock the allocator mutex and then use erts_printf that in turn may call the sys allocator through the wrappers. To avoid breaking locking order these query functions first "pre-locks" all allocator wrappers.
2013-04-02erts: Fix unabused bug in fixed allocationSverker Eriksson
Make sure each fix allocator type always allocate the right fixed size.
2013-04-02erts: Refactor in new struct ErtsAllctrFixDDBlock_tSverker Eriksson
to replace macro constant ERTS_ALCU_DD_FIX_TYPE_OFFS.
2013-02-11erts: Evict old cached segments for newer onesBjörn-Egil Dahlberg
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-23Merge branch 'sverk/r16/utf8-atoms'Sverker Eriksson
* sverk/r16/utf8-atoms: erl_interface: Fix bug when transcoding atoms from and to UTF8 erl_interface: Changed erlang_char_encoding interface erts: Testcase doing unicode atom printout with ~w erl_interface: even more utf8 atom stuff erts: Fix bug in analyze_utf8 causing faulty latin1 detection Add UTF-8 node name support for epmd workaround... Fix merge conflict with hasse UTF-8 atom documentation test case erl_interface: utf8 atoms continued Add utf8 atom distribution test cases atom fixes for NIFs and atom_to_binary UTF-8 support for distribution Implement UTF-8 atom support for jinterface erl_interface: Enable decode of unicode atoms stdlib: Fix printing of unicode atoms erts: Change internal representation of atoms to utf8 erts: Refactor rename DFLAG(S)_INTERNAL_TAGS for conformity Conflicts: erts/emulator/beam/io.c OTP-10753
2013-01-08erts: Change internal representation of atoms to utf8Sverker Eriksson
2012-12-14erts: Optimize erl_alloc_util.c by substitute MBC_BLK_SZSverker Eriksson
with either MBC_ABLK_SZ or MBC_FBLK_SZ in all cases when we already know what kind of block it is.
2012-12-14erts: Fix bug when allocating size near sbc_thresholdSverker Eriksson
A block larger than sbc_threshold can be allocated in MBC if the subsequent "residue block" is smaller than min_block_size. Solved by lowering sbc_threshold to ("hard limit" - min_block_size).
2012-11-21erts: Make carrier header sizes compile time constantsSverker Eriksson
No allocator strategy is using customized carrier headers anyway.
2012-11-19erts: Cleanup minor things in alloc_utilSverker Eriksson
2012-11-16erts: Fix compile warnings in alloc_utilSverker Eriksson