Skip to content

Commit

Permalink
[erts] Lookup of key/value in dictionary using process_info/2
Browse files Browse the repository at this point in the history
  • Loading branch information
rickard-green committed Sep 30, 2023
1 parent 2bdd30b commit 42a837c
Show file tree
Hide file tree
Showing 9 changed files with 513 additions and 53 deletions.
5 changes: 5 additions & 0 deletions erts/doc/src/erlang.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6923,6 +6923,11 @@ receive_replies(ReqId, N, Acc) ->
<item>
<p><c><anno>Dictionary</anno></c> is the process dictionary.</p>
</item>
<tag><c>{{dictionary, <anno>Key</anno>}, <anno>Value</anno>}</c></tag>
<item>
<p><c><anno>Value</anno></c> associated with <c><anno>Key</anno></c>
in the process dictionary.</p>
</item>
<tag><c>{error_handler, <anno>Module</anno>}</c></tag>
<item>
<p><c><anno>Module</anno></c> is the error handler module used by
Expand Down
10 changes: 10 additions & 0 deletions erts/emulator/beam/erl_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,16 @@ erts_alloc_get_verify_unused_temp_alloc(Allctr_t **allctr);
#define ERTS_ALC_DATA_ALIGN_SIZE(SZ) \
(((((SZ) - 1) / 8) + 1) * 8)

#if defined(ARCH_64)
#define ERTS_ALC_WORD_ALIGN_SIZE(SZ) \
ERTS_ALC_DATA_ALIGN_SIZE((SZ))
#elif defined(ARCH_32)
#define ERTS_ALC_WORD_ALIGN_SIZE(SZ) \
(((((SZ) - 1) / 4) + 1) * 4)
#else
#error "Not supported word size"
#endif

#define ERTS_ALC_CACHE_LINE_ALIGN_SIZE(SZ) \
(((((SZ) - 1) / ERTS_CACHE_LINE_SIZE) + 1) * ERTS_CACHE_LINE_SIZE)

Expand Down
Loading

0 comments on commit 42a837c

Please sign in to comment.