Age | Commit message (Collapse) | Author |
|
* lukas/erts/non-smp-debug-fixes/OTP-13047:
erts: Fix incorrect non-smp debug assert
erts: std_alloc is not thread safe on non-smp
Conflicts:
erts/emulator/beam/erl_alloc_util.c
|
|
|
|
on 32-bit, as the granularity of the literal bit vector
is super-alignment.
|
|
Make the callbacks more general to be usable for any allocator
that that uses its own ErtsMemMapper.
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
* carrier_create
* carrier_destroy
* carrier_pool_put
* carrier_pool_get
|
|
|
|
|
|
|
|
One little (unsigned long) left behind.
|
|
|
|
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).
|
|
Assert thread unsafe allocator is only created on non-smp
and only called by the main thread.
Removed test of unsafe allocator in custom thread.
|
|
|
|
|
|
|
|
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.
|
|
Problem #1: Seems the dc_list check did end up as dead code by mistake.
Solution: goto check_dc_list
Problem #2: crr->cpool.max_size was set to zero for all carriers in
dc_list, which meant no carriers were ever resurrected by cpool_fetch.
Solution: Do not use callback 'largest_fblk_in_mbc' to set max_size
as it will always return 0 (due to problem #3).
Problem #3: Resurrected carriers were broken as their one free block
was not linked.
Solution: Link free block when fetching carrier from dc_list.
|
|
and remove that magic "-40" from default mmbcs for ll_alloc
|
|
|
|
|
|
|
|
and usage
|
|
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.
|
|
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().
|
|
|
|
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.
|
|
|
|
|
|
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
|
|
* lukas/erts/supercarrier_fix/OTP-11149:
Improve error info when main carrier creation fails
Conflicts:
erts/emulator/test/alloc_SUITE.erl
|
|
* sverk/allctr-4byte-align-bug:
erts: Fix alignment bug in allocator start code
OTP-11496
|
|
Also fix testcase that failed due to main carrier creation failure.
|
|
* rickard/acul-bug/OTP-11456:
Ensure carrier pool only accessed by schedulers
|
|
Bug never released.
|
|
The switch "+Musac <boolean>" controls if sys_alloc carriers
are allowed.
|
|
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.
|
|
* 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
|
|
Introduce unconditional ERTS_ASSERT
and use that for both ASSERT and ASSERT_EXPR.
|
|
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
|
|
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.
|
|
|
|
|
|
That is, include information about carrier pool in result returned from
erlang:system_info({allocator,allocator_sizes, _}).
|
|
|
|
|
|
|
|
|
|
|
|
A cleanup after SBMBC was removed.
|