Skip to content

Commit

Permalink
Merge pull request erlang#7707 from rickard-green/rickard/pinfo-dict/…
Browse files Browse the repository at this point in the history
…OTP-18765

Lookup of key/value in dictionary using process_info/2
  • Loading branch information
rickard-green authored Oct 6, 2023
2 parents 3a914d2 + a4f7ac1 commit 67f87be
Show file tree
Hide file tree
Showing 9 changed files with 516 additions and 54 deletions.
5 changes: 5 additions & 0 deletions erts/doc/src/erlang.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6925,6 +6925,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 67f87be

Please sign in to comment.