12345678910111213141516171819open!Importtype'at='a[@@derivingsexp_of]externalis_heap_block:Caml.Obj.t->bool="core_heap_block_is_heap_block"[@@noalloc]letis_okv=is_heap_block(Caml.Obj.reprv)letcreatev=ifis_okvthenSomevelseNoneletcreate_exnv=ifis_okvthenvelsefailwith"Heap_block.create_exn called with non heap block";;letvaluet=tletbytes_per_word=Word_size.(num_bitsword_size)/8letbytes(typea)(t:at)=(Caml.Obj.size(Caml.Obj.repr(t:at))+1)*bytes_per_word;;