Browse Source

ft: utTermSize.erl 修正

master
lijie 2 years ago
parent
commit
30b0f6c267
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      src/dataType/utTermSize.erl

+ 11
- 0
src/dataType/utTermSize.erl View File

@ -63,6 +63,17 @@ byteSizeTermGlobal(Term) when is_binary(Term) ->
% heap binary
0
end;
byteSizeTermGlobal(Term) when is_bitstring(Term) ->
% global data storage within allocators
BinarySize = erlang:byte_size(Term),
if
BinarySize > ?HEAP_BINARY_LIMIT ->
% refc binary
BinarySize;
true ->
% heap binary
0
end;
byteSizeTermGlobal(_) ->
0.

Loading…
Cancel
Save