From ee89f9300925f3dcc66efc7e5cc5aea023f33a88 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Mon, 11 Jun 2012 23:40:28 +0100 Subject: [PATCH] Use a uniform method to calculate bytes that can manage lists as well. --- src/hanoidb_nursery.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hanoidb_nursery.erl b/src/hanoidb_nursery.erl index d2ab8e7..cb3ae17 100644 --- a/src/hanoidb_nursery.erl +++ b/src/hanoidb_nursery.erl @@ -274,7 +274,7 @@ transact(Spec, Nursery=#nursery{ log_file=File, cache=Cache0, total_size=TotalSi Count = gb_trees:size(Cache2), - do_inc_merge(Nursery2#nursery{ cache=Cache2, total_size=TotalSize+byte_size(Data), count=Count }, + do_inc_merge(Nursery2#nursery{ cache=Cache2, total_size=TotalSize+erlang:iolist_size(Data), count=Count }, length(Spec), Top). do_inc_merge(Nursery=#nursery{ step=Step, merge_done=Done }, N, TopLevel) ->