Skip to content

Conversation

michalmuskala
Copy link
Contributor

In particular, this includes the full original binary and all the references. Gathering this information requires full heap traversal, so is fairly expensive - that's why we keep both the existing binary and this new API.

Example:

1> A = <<0:(1024*8)>>.
2> <<B:550/bitstring,D:550/bits,E:550/bits,C/bitstring>> = A.
3> erlang:process_info(self(),[binary_full]).
[{binary_full,[{126812357133856,1024,1,
           <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...>>,
           [{1100,1650},{550,1100},{1650,8192},{0,550},{0,8192}]}]}]

Original draft implementation by @garazdawi in garazdawi@d5a2c6f.

Copy link
Contributor

github-actions bot commented Oct 7, 2025

CT Test Results

    3 files    135 suites   49m 39s ⏱️
1 651 tests 1 594 ✅ 57 💤 0 ❌
2 287 runs  2 211 ✅ 76 💤 0 ❌

Results for commit 39c06bb.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@michalmuskala michalmuskala force-pushed the binary-full branch 5 times, most recently from eb25eca to 1ca8340 Compare October 7, 2025 12:07
In particular, this includes the full original binary and all the references.
Gathering this information requires full heap traversal, so is fairly expensive -
that's why we keep both the existing `binary` and this new API.

Example:

```
1> A = <<0:(1024*8)>>.
2> <<B:550/bitstring,D:550/bits,E:550/bits,C/bitstring>> = A.
3> erlang:process_info(self(),[binary_full]).
[{binary_full,[{126812357133856,1024,1,
           <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...>>,
           [{1100,1650},{550,1100},{1650,8192},{0,550},{0,8192}]}]}]
```

Co-authored-by: Lukas Backström <lukas@erlang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants