I am not sure how big is the returned value, but do you plan to use it more than just to compare the sizes as an assert? Otherwise, I'd recommend to do the check right after we get the returned value and store only the last size.