let rec sizeof_object = function
| C_int i -> Int64.of_int (i_sizeof i)
| C_float f -> Int64.of_int (f_sizeof f)
| C_pointer _ty -> Int64.of_int (i_sizeof (c_ptr()))
| C_comp cinfo ->
List.fold_left
(fun sz f ->
Int64.add sz (sizeof_object (object_of f.ftype)))
Int64.zero cinfo.cfields
| C_array ainfo ->
begin
match ainfo.arr_flat with
| Some a -> Int64.mul
(sizeof_object(object_of a.arr_cell)) a.arr_cell_nbr
| None -> WpLog.not_yet_implemented "Sizeof unknown-size array"
end