瀏覽代碼

ft: utTermSize.erl 修正

master
lijie 2 年之前
父節點
當前提交
30b0f6c267
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. +11
    -0
      src/dataType/utTermSize.erl

+ 11
- 0
src/dataType/utTermSize.erl 查看文件

@ -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…
取消
儲存