Skip to content

Commit

Permalink
fix size unit in atom_text_alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
lucioleKi committed Jul 2, 2024
1 parent 7e96229 commit aafad13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erts/emulator/beam/atom.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ atom_text_alloc(int bytes, Uint* size)
} else {
bytes = ERL_REFC_BITS_SIZE;
}
*size = bytes;
bytes *= sizeof(Eterm);

if (atom_text_pos + bytes >= atom_text_end) {
Expand All @@ -124,7 +125,6 @@ atom_text_alloc(int bytes, Uint* size)
res = atom_text_pos;
atom_text_pos += bytes;
atom_space += bytes;
*size = bytes;
ASSERT(_is_taggable_pointer(res));
return (Eterm*)res;
}
Expand Down

0 comments on commit aafad13

Please sign in to comment.