Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sub-binaries of sub-binaries sub-binaries #905

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

pguyot
Copy link
Collaborator

@pguyot pguyot commented Oct 28, 2023

Fix a bug where sub-binaries of sub-binaries were reallocated, thus wasting memory.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pguyot
Copy link
Collaborator Author

pguyot commented Oct 29, 2023

It fails on all 32 bits implementation.

Fix a bug where sub-binaries of sub-binaries were reallocated, thus wasting
memory.

Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot force-pushed the w43/subbinary-of-subbinary branch from dcc47d3 to 3e475d8 Compare October 29, 2023 12:45
@pguyot
Copy link
Collaborator Author

pguyot commented Oct 29, 2023

This was a typo where a 7 was changed into 47 for no good reason, and this broke the test on 32 bits as the binary is only 32 bytes there which is smaller than 47.

bettio added a commit to bettio/AtomVM-fork that referenced this pull request Oct 29, 2023
Make sub-binaries of sub-binaries sub-binaries

Fix a bug where sub-binaries of sub-binaries were reallocated, thus wasting
memory.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
@bettio bettio merged commit 21dfa6d into atomvm:master Oct 29, 2023
83 of 84 checks passed
@pguyot pguyot deleted the w43/subbinary-of-subbinary branch October 29, 2023 19:56
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